curl -i -H "Accept: application/json" -X PUT -d "" http://localhost:5984/chatbot/
curl -X GET http://localhost:5984/chatbot/_all_docs?include_docs=true
svn diff | source-highlight --out-format=esc --src-lang=diff |
#!/bin/bash | |
# Watch files for changes and perform an action. | |
# Needs inotify-tools. | |
function doAction { | |
./copy-admin-templates.sh; | |
xdotool search --name chrome key --window %@ F5; | |
} |
curl -i -H "Accept: application/json" -X PUT -d "" http://localhost:5984/chatbot/
curl -X GET http://localhost:5984/chatbot/_all_docs?include_docs=true
// example body | |
var buf = new Buffer(9); | |
// start of frame | |
buf[0] = '0xAA'; | |
buf[1] = '0xBB'; | |
// message to send - crc is based on this | |
var msg = ['0x01', '0x03', '0x00', '0x00', '0x01']; |
mkdir -p /run/shm
sudo mount -t tmpfs -o size=1024M tmpfs /run/shm
or more permanently in /etc/fstab
tmpfs /run/shm tmpfs size=1g 0 0
<?php | |
use Monolog\Logger; | |
use Monolog\Handler\StreamHandler; | |
class foo extends bar | |
{ | |
private $log = null; | |
public function __construct($swiftmailer, $service_container) |
## known date of 1st jan 2000 | |
# baktun = "13" | |
# katun = "20" | |
# tun = "7" | |
# uinal = "16" | |
# kin = "3" | |
## target date to find - should return 22 March 2001 | |
baktun = "13" | |
katun = "20" |
var insertCount = 0; | |
document.addEventListener("DOMNodeInserted", function( e ) { | |
insertCount++; | |
console.log(insertCount); | |
}, false); |
entry = input("Enter a Mayan date: ") | |
i=0 # this is used to track our position in the string | |
output = "" # start with output set to nothing | |
while entry[i:]: | |
# if we hit a space, then we've got to the end of that number | |
# print it out and reset the output | |
if entry[i] == " ": | |
print (output) |