- sudo service network-manager stop
- sudo ifconfig wlp2s0 down
- sudo macchanger -r wlp2s0
- sudo ifconfig wlp2s0 up
- sudo service network-manager restart
- sudo service network-manager stop
- sudo ifconfig wlp2s0 down
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty | |
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua | |
http { | |
lua_package_path "/etc/nginx/include.d/?.lua;;"; | |
lua_socket_pool_size 100; | |
lua_socket_connect_timeout 10ms; | |
lua_socket_read_timeout 10ms; | |
server { |
function parser(url) { | |
return url.replace(/^\/(.*)$/g, '$1'); | |
} | |
HOST = 'http://127.0.0.1:8080/'; | |
function get(url = '/get') { | |
fetch(HOST + parser(url), { | |
method: 'GET', | |
}).then((data) => data.json()).then((data) => console.log(data)); |
#!/usr/bin/env python | |
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
# Written by Nathan Hamiel (2010) | |
# Cloned & Updated from: https://gist.github.com/1kastner/e083f9e813c0464e6a2ec8910553e632 | |
import json | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
allow = False |
mkdir -p ~/.backup/rabbitmq/lumen6
sudo chown -R 1001:1001 ~/.backup/rabbitmq/lumen6
sudo chown anik:anik ~/.backup/rabbitmq/lumen6
<?php | |
/** | |
* Creating MongoDB like ObjectIDs. | |
* Using current timestamp, hostname, processId and a incremting id. | |
* | |
* @author Julius Beckmann | |
*/ | |
function createMongoDbLikeId($timestamp, $hostname, $processId, $id) | |
{ |
<?php | |
declare(strict_types = 1); | |
namespace App\Kafka; | |
use RdKafka; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputInterface; |
/etc/systemd/system/docker.service.d/startup_options.conf
# /etc/systemd/system/docker.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376
@version:3.2 | |
# =============================================================================================== | |
# Configuration file for syslog-ng, customized for remote logging | |
# =============================================================================================== | |
# Options | |
# Note about $HOST / HOST | |
# Description: The name of the source host where the message originates from. | |
# If the message traverses several hosts and the chain_hostnames() option is on, the first host in the chain is used. | |
# If the keep_hostname() option is disabled (keep_hostname(no)), the value of the $HOST macro will be the DNS hostname of the host that sent the message to syslog-ng OSE (that is, the DNS hostname of the last hop). In this case the $HOST and $HOST_FROM macros will have the same value. |