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 <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
typedef int (*scfunc)(const char *, const char *); | |
struct SysCall { | |
char* name; | |
scfunc func; |
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 json | |
import os | |
import os.path | |
import platform | |
import requests | |
import shutil | |
import subprocess | |
import time | |
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
class left_pad: | |
def __init__(this,PadChar=' ',width=4): | |
this.PadChar=PadChar | |
this.width = width | |
def LeftPad(this,stringToPadWithChar): | |
charsToPad=this.width-len(stringToPadWithChar) | |
OutStr='' | |
if(charsToPad>0): | |
for i in range(0,charsToPad): | |
OutStr=OutStr+this.PadChar |
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 <SoftwareSerial.h> | |
const int MD49_RX = 8; | |
const int MD49_TX = 9; | |
SoftwareSerial md49(MD49_RX, MD49_TX); | |
void setup() { | |
// put your setup code here, to run once: |
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 <SoftwareSerial.h> | |
const int MD49_RX = 8; | |
const int MD49_TX = 9; | |
const int SABER_TX = 10; | |
const int SABER_UNUSED = 11; | |
const int CMD_MD49 = 0x01; | |
const int CMD_SABER = 0x02; | |
SoftwareSerial md49(MD49_RX, MD49_TX); |
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
var a = '' | |
var b = [] | |
if (a == b && !a && b) { | |
console.log('win') | |
} |
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 json | |
import os | |
import os.path | |
import platform | |
import requests | |
import shutil | |
import subprocess | |
import time | |
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 file | python2 -c 'import json,sys;print json.dumps({"files":{"f":{"content":sys.stdin.read()}}})' | curl -d '@-' https://api.github.com/gists | grep -Pom1 '(?<="url": ")(.+)(?=")' | sed 's@api\.@gist.@;s@gists/@@' |
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 subprocess | |
import re | |
import sys | |
OUTPUT_RE = r'(.+) = (.+)' | |
PROP_CURRENT = '_NET_CURRENT_DESKTOP(CARDINAL)' | |
PROP_DESKTOPS = '_NET_DESKTOP_NAMES(UTF8_STRING)' |
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/ksh | |
if [ "x$1" == x ]; then | |
echo "Usage: $0 ifaces dir" >&2 | |
echo "ifaces -- comma-separated network interfaces" >&2 | |
echo "dir -- path to put output files in" >&2 | |
exit 1 | |
fi | |
IFS=',' set -A ifaces $1 |