This file contains hidden or 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 <stdio.h> | |
#include <linux/version.h> | |
#include <sys/utsname.h> | |
/* | |
* from rhel7's linux/version.h: | |
* #define LINUX_VERSION_CODE 199168 | |
* #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) | |
*/ |
This file contains hidden or 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 <ESP8266WiFi.h> //https://github.com/esp8266/Arduino | |
//needed for library | |
#include <DNSServer.h> | |
#include <ESP8266WebServer.h> | |
#include <WiFiManager.h> //https://github.com/tzapu/WiFiManager | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(115200); |
This file contains hidden or 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
#!/opt/python/current/bin/python | |
# working meta_yaml.py: | |
# mde="$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/markdown/extensions" | |
# test -e ${mde} && mkdir -p ${mde} | |
# wget -P ${mde} https://raw.githubusercontent.com/teoric/python-markdown-yaml-meta-data/master/meta_yaml.py | |
# sed -i 's/>meta/<normalize_whitespace/g' ${mde}/meta_yaml.py | |
# | |
# apache conf: | |
# Action rendermd /cgi-bin/rendermd.cgi |
This file contains hidden or 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 python | |
import json | |
import os | |
import platform | |
import sys | |
i = {} | |
for m in [os,platform,sys]: |
This file contains hidden or 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
// | |
// gclone.c | |
// clone only git client using libgit2 | |
// ignores all cert errors - unsafe! | |
// usage: glone <url> <path> | |
// links: | |
// sample clone: https://libgit2.github.com/docs/guides/101-samples/#repositories_clone_simple | |
// based on examples/network/clone.c: https://github.com/libgit2/libgit2/blob/master/examples/network/clone.c | |
// license: public domain | |
// |
This file contains hidden or 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
SOLIPSISTIC ECLIPSE PUBLIC LICENSE | |
Version 1, NOVEMBER 2014 | |
Copyright (C) 2014 | |
Everyone is permitted to copy and distribute verbatim copies of this license | |
document. Modified copies of this document are permitted provided that they | |
denounce BOTH the original AND their copy as mere sense data with no verifiable | |
cause outside the mind. | |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
This file contains hidden or 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
# https://stackoverflow.com/questions/246725/how-do-i-add-tab-completion-to-the-python-shell | |
# https://gist.github.com/twneale/5245670 | |
# | |
# add to ~/.pythonrc | |
# set environment: | |
# export PYTHONSTARTUP="$HOME/.pythonrc" | |
# | |
# enable syntax completion | |
try: | |
import readline |
This file contains hidden or 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/bash | |
for i in {1..7} ; do | |
echo $i 1>&2 | |
cat the_caretaker-an_empty_bliss_beyond_this_world.mp3 | |
done \ | |
| lame \ | |
--preset standard \ | |
--mp3input \ | |
- \ | |
the_caretaker-an_empty_bliss_beyond_this_world-6hr_loop.mp3 |
This file contains hidden or 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 python | |
# | |
# erase the esp8266 flash | |
# sudo $(which esptool.py) --port /dev/ttyUSB0 erase_flash | |
# write the micropython firmware | |
# sudo $(which esptool.py) --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect -fm dio 0 /tmp/esp8266-20190125-v1.10.bin | |
# save this file to esp8266_wifi.py | |
# add your wireless network/password to the wifi.connect() line | |
# run: | |
# echo "f=open('/main.py','w')" |
This file contains hidden or 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 | |
/bin/test -e /etc/fstab && /bin/mount -a | |
/bin/test -e /dev/urandom || /bin/mknod -m 666 /dev/urandom c 1 9 | |
/bin/test -e /dev/zero || /bin/mknod -m 666 /dev/zero c 1 5 | |
/bin/test -e /dev/null || /bin/mknod -m 666 /dev/null c 1 3 | |
/bin/syslogd | |
/bin/ifconfig eth0 0.0.0.0 up | |
/bin/udhcpc -b -v |