This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
file: app/lib/daemon.php | |
desc: daemon class | |
*/ | |
class mod_daemon { | |
private $jobs = array(); | |
private $threads = array(); | |
private $dbfunc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local testconf = { | |
test = 'hi', | |
test2 = { | |
hi = 'ho', | |
what = true, | |
fuck = function() return 'hello' end | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a page. | |
/* Some JS assets */ | |
{{ assets( | |
'js/test.js', 'js/device.js', | |
filters='jsmin', extension='js') }} | |
/* Some CSS assets */ | |
{{ assets( | |
'css/blah.css', 'css/print.css', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# PyClean | |
# Remove .pyc files with no matching py file | |
FILES=`find . -name "*.pyc"` | |
for PYC_FILE in $FILES; do | |
PY_FILE=${PYC_FILE/.pyc/.py} | |
if [ ! -f "$PY_FILE" ] || [ "$1" = "--all" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.readable =function(loops) { | |
function isDescendant(parent, child) { | |
var node = child.parentNode; | |
while (node != null) { | |
if (node == parent) { | |
return true; | |
} | |
node = node.parentNode; | |
} | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gevent import monkey | |
monkey.patch_all() | |
import logging | |
from collections import deque | |
from gevent.pool import Pool | |
from valve.source.master_server import MasterServerQuerier | |
from valve.source.a2s import ServerQuerier, NoResponseError | |
from valve.source.messages import BrokenMessageError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
playbook -i inventories/development playbook.yml --extra-vars 'ansible_ssh_private_key=files/insecure_private_key' -vvv | |
PLAY [all] ******************************************************************** | |
TASK: [Ensure /opt/bin directory] ********************************************* | |
... | |
fatal: [192.168.255.12] => SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue | |
fatal: [192.168.255.10] => SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue | |
fatal: [192.168.255.11] => SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue | |
fatal: [192.168.255.13] => SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sick of OSX bullshit | |
# `brew link openssl --force` first | |
LDFLAGS="-L/usr/local/opt/openssl/lib" LIBRARY_PATH=/usr/local/lib pip install uwsgi -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from socket import gaierror, error as socket_error | |
from paramiko import ( | |
SSHClient, MissingHostKeyPolicy, SSHException, AuthenticationException | |
) | |
from inventory import ALL | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pyinfra -i inventories/dev.py --run server.user 'git --version' -v | |
... | |
--> Starting operation: Server/Shell | |
openbsd56.pyinfra: >>> sh -c 'git --version' | |
centos6.pyinfra: >>> sh -c 'git --version' | |
debian8.pyinfra: >>> sh -c 'git --version' | |
ubuntu14.pyinfra: >>> sh -c 'git --version' | |
debian7.pyinfra: >>> sh -c 'git --version' | |
ubuntu15.pyinfra: >>> sh -c 'git --version' | |
centos7.pyinfra: >>> sh -c 'git --version' |
OlderNewer