View main.cpp
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
#include <QtDebug> | |
#include <QImage> | |
#include <QString> | |
#include <QBitArray> | |
#include <QByteArray> | |
#include <QFile> | |
#include <QCommandLineParser> | |
namespace { | |
enum { headerSize = 32 }; |
View main.py
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
#!/usr/bin/env python3 | |
import re | |
import functools | |
import itertools | |
from pathlib import Path | |
import click | |
from jinja2 import Environment, BaseLoader, Template | |
try: |
View script.sh
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
zfs create tank/apps/gphotos | |
iocage create --release 11.2-RELEASE --name "gphotos" \ | |
boot="on" \ | |
vnet="on" \ | |
defaultrouter="192.168.1.1" \ | |
ip4_addr="vnet0|192.168.1.40/24" | |
iocage exec gphotos "mkdir -p /usr/local/etc/pkg/repos" | |
iocage exec gphotos "echo -e 'FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/latest\" }' > /usr/local/etc/pkg/repos/FreeBSD.conf" |
View gist:5017547
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
""" | |
python <(curl https://gist.githubusercontent.com/skhaz/5017547/raw/7f76930c17ce0ec6c67c8a7fefe29fb2cc46d1f9/gistfile1.py) | |
""" | |
import requests | |
import re | |
def Ed(text): | |
params=dict(server='0.0.0.0:8085',charset_post='utf-8', | |
charset='utf-8',pure=1,js=0,tst=1,msg=text) |
View vpsbench.sh
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
wget freevps.us/downloads/bench.sh -O - -o /dev/null | bash |
View SDL2_Windows.pro
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
TEMPLATE = app | |
CONFIG -= console | |
CONFIG -= app_bundle | |
CONFIG -= qt | |
CONFIG -= windows | |
SDL2_PATH = D:\Workspace\SDL2 | |
LIBS += -L $${SDL2_PATH}\lib -lSDL2 -lSDL2main -lSDL2_image | |
INCLUDEPATH += $${SDL2_PATH}\include |
View gist:6905342
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
cat *.cpp *.h | cpp -fpreprocessed | sed 's/[_a-zA-Z0-9][_a-zA-Z0-9]*/x/g' | wc -c |
View gist:5398392
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
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
#include <iterator> | |
#include <functional> | |
int main(int argc, char **argv) | |
{ | |
using namespace std; |
View gist:5226167
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
def render(*args, **kwargs): | |
import inspect | |
call_frame = inspect.getouterframes(inspect.currentframe(), 2) | |
template = jinja2.get_template('{}.html'.format(call_frame[1][3])) | |
return template.render(*args, **kwargs) | |
@route('/') | |
@memorize |
View client.py
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 os | |
import zmq | |
import wiringpi | |
RED_PIN = 0 | |
GREEN_PIN = 1 | |
BLUE_PIN = 2 | |
def main(): | |
context = zmq.Context() |
NewerOlder