- copy the autostart
cp /etc/xdg/lxsession/LXDE-pi/autostart ~/.config/lxsession/LXDE-pi/
The following will guide you through the process of enabling SSL on a Apache webserver
Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:
| #!/bin/sh | |
| # Save as .git/hooks/post-merge | |
| # Set execute bit like: chmod ug+x .git/hooks/post-merge | |
| purgePath="temp/cache" | |
| echo | |
| echo -n "HOOK [Purge cache]: " | |
| if [ -d "$purgePath" ]; then |
| <?php | |
| require 'nette.phar'; | |
| //Tracy\Debugger::enable(); | |
| $dns = "mysql:host=localhost;dbname=database"; | |
| $user = "user"; | |
| $password = "*****"; |
| error_log syslog:server=unix:/var/log/nginx.sock; | |
| http { | |
| log_format verbose '$remote_addr - $remote_user $host "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'; | |
| map $status $loggable { | |
| ~^[2] 0; | |
| default 1; | |
| } |
| /** | |
| * api/models/User.js | |
| * | |
| * The user model contains the instance method for validating the password. | |
| */ | |
| var bcrypt = require('bcrypt'); | |
| function hashPassword(values, next) { | |
| bcrypt.hash(values.password, 10, function(err, hash) { |
| VERSION=0.20.6 | |
| sudo apt-get update | |
| sudo apt-get install openjdk-6-jdk | |
| wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$VERSION.deb | |
| sudo dpkg -i elasticsearch-$VERSION.deb | |
| # be sure you add "action.disable_delete_all_indices" : true to the config!! |
| // 1) Lets start with the simplest query that you can run in | |
| // the head plugin for ElasticSearch located at the url: | |
| // http://localhost:9200/_plugin/head/ | |
| { | |
| "query": { | |
| "match_all": {} | |
| } | |
| } | |
| // 2) Before jumping into forming queries with the ES Query DSL |
| <?php | |
| function cidr_match($ip, $ranges) | |
| { | |
| $ranges = (array)$ranges; | |
| foreach($ranges as $range) { | |
| list($subnet, $mask) = explode('/', $range); | |
| if((ip2long($ip) & ~((1 << (32 - $mask)) - 1)) == ip2long($subnet)) { | |
| return true; | |
| } | |
| } |