Skip to content

Instantly share code, notes, and snippets.

View mgalgs's full-sized avatar
🍔
pizza

Mitchel Humpherys mgalgs

🍔
pizza
View GitHub Profile
diff -rupN -x GPATH -x GRTAGS -x GTAGS -x ID -x '*.pro' busybox-1.19.4.orig/include/libbb.h busybox-1.19.4/include/libbb.h
--- busybox-1.19.4.orig/include/libbb.h 2012-02-04 11:34:24.000000000 -0800
+++ busybox-1.19.4/include/libbb.h 2012-10-09 20:19:52.514340293 -0700
@@ -35,6 +35,7 @@
#include <sys/poll.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
+#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/stat.h>
from optparse import make_option
from os.path import dirname, basename
from subprocess import check_output
from django.core.management.base import AppCommand
from south.models import MigrationHistory
class Command(AppCommand):
help = "Clear app (with manage.py sqlclear) and south migrations for app"
def handle_app(self, app, verbosity = 1, **options):
printer = Printer(verbosity = verbosity)
@mgalgs
mgalgs / example.el
Last active December 13, 2015 20:28
example header comments
;;; Commentary:
;;
;; Easily convert elisp file headers to markdown text. The file
;; comment headers should be similar to this one.
;;
;;; Installation:
;;
;; None
;;
;;; Use:
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
"Version 8000"
(message "This is %s yet another gh.el test!" "still")
(message "https://github.com/sigma/gh.el")
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
(message "hello, %s!" "stuff")
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
(message "hello, more %s!" "stuff")
@mgalgs
mgalgs / 1193.py
Last active December 15, 2015 16:09
Brute force http://xkcd.com/1193/
#!/usr/bin/env python3
# REQUIRES:
# pyskein http://pythonhosted.org/pyskein/
# python > 3.0 (due to pyskein)
#
# INSTALLATION:
# (install virtualenv)
# (install python3)
# virtualenv -p /path/to/python3 skein
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
isearch-search()
isearch-search-and-update()
(let ((string (concat "\\<" (buffer-substring-no-properties (progn (skip-syntax-backward "w_") (point)) (progn (skip-syntax-forward "w_") (point))) "\\>"))) (if (and isearch-case-fold-search (eq (quote not-yanks) search-upper-case)) (setq string (downcase string))) (setq isearch-string string isearch-message (concat isearch-message (mapconcat (quote isearch-text-char-description) string "")) isearch-yank-flag t) (isearch-search-and-update))
(progn (let ((string (concat "\\<" (buffer-substring-no-properties (progn (skip-syntax-backward "w_") (point)) (progn (skip-syntax-forward "w_") (point))) "\\>"))) (if (and isearch-case-fold-search (eq (quote not-yanks) search-upper-case)) (setq string (downcase string))) (setq isearch-string string isearch-message (concat isearch-message (mapconcat (quote isearch-text-char-description) string "")) isearch-yank-flag t) (isearch-search-and-update)))
(if (equ
@mgalgs
mgalgs / Makefile
Last active April 11, 2018 17:09
ELF section hacking!
all: section_hacking
section_hacking:
gcc -g -O0 -Werror -Wall -o section_hacking section_hacking.c plugin.c
clean:
rm -f *.o section_hacking
Formatters are sitting from 0x0x601020 to 0x0x601050
Formatting with in_quotes: "My Formatted Text"
Formatting with in_equotes: `My Formatted Text'
Formatting with in_arrows: -->>>My Formatted Text<<<---