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
/* Dump raw data to a unsigned char array. */ | |
void c_array_dump(FILE *stream, const char *label, unsigned char *data, size_t size) | |
{ | |
int pos; | |
fprintf(stream, "const unsigned char %s[] = {\n\t", label); | |
for (pos = 0; pos < size ; ++pos) { | |
fprintf(stream, "0x%02X", (unsigned char) data[pos]); | |
if (pos+1 != size) | |
fprintf(stream, ", "); |
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
set et | |
set ts=4 | |
set sw=4 | |
set ai | |
set smarttab | |
set incsearch | |
set hlsearch | |
set wildmenu | |
set wildmode=list:longest,full | |
set backspace=2 |
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 <stdlib.h> | |
#include <talloc.h> | |
#include <dirent.h> | |
#include <regex.h> | |
int main(int argc, char *argv[]) | |
{ | |
int arg; | |
regex_t pattern; |
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/bash | |
Recipient="[email protected]" | |
Subject="Status: $(date --date="7 days ago" +'%y-%m-%d')" | |
LastWeek=`task export status:completed end.after:$(date --date="7 days ago" "+%m/%d/%Y") |json_reformat | grep description | sed -e "s/\"description\"\: \"/\* /" -e "s/\",$//"` | |
ThisWeek=`task export status:pending |json_reformat | grep description | sed -e "s/\"description\"\: \"/\* /" -e "s/\",$//"` | |
Body=`echo -e "Last Week:\n\n${LastWeek}\n\nThis Week:\n\n${ThisWeek}\n\nGrant."` | |
thunderbird -compose "to='$Recipient',subject='$Subject',body='$Body'" |
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> | |
int main() | |
{ | |
void *p; | |
if (((unsigned long)p) & 15 == 0) | |
puts("16 bit aligned"); | |
if (((unsigned long)p) & 23 == 0) | |
puts("24 bit aligned"); | |
if (((unsigned long)p) & 31 == 0) | |
puts("32 bit aligned"); |
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 resource = require('express-resource') | |
, stuff = require('./resources/stuff') // the resource being wrapped.. | |
, _ = require('underscore') | |
var inject = (function(){ | |
if (arguments.length < 2){ | |
console.log(arguments.length) | |
throw "Invalid arguments" | |
} |
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/bash | |
vim $(ack -g $@) |
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
int main() | |
{ | |
const char *answer; | |
plan_tests(2); | |
answer = read_answer(stdin); | |
if (!answer){ | |
fail("Malformed JSON data provided"); | |
} else { | |
pass("Valid JSON data recieved"); | |
} |
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 sublime, sublime_plugin | |
import subprocess, threading | |
def _run(cmd, args): | |
subprocess.call([cmd, args]) | |
class SpeakCommand(sublime_plugin.TextCommand): | |
def run(self, edit): |
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 AutoSave = (function(){ | |
var timer = null; | |
function getEditor(){ | |
var elems = document.getElementsByTagName("textarea") | |
if (elems.length <= 0) | |
return null; |
OlderNewer