Skip to content

Instantly share code, notes, and snippets.

View jevinskie's full-sized avatar

Jevin Sweval jevinskie

View GitHub Profile
@bignerdranch
bignerdranch / BNRTimeBlock.h
Created March 9, 2012 13:51
Timing Utility Post 20120308
CGFloat BNRTimeBlock (void (^block)(void));
@winocm
winocm / kdump.c
Created March 26, 2012 02:25
kernel stuff for ARM XNU
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
@ramnathv
ramnathv / gh-pages.md
Created March 28, 2012 15:37
Creating a clean gh-pages branch

Creating a clean gh-pages branch

This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]

cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
@BlackRabbit-github
BlackRabbit-github / pyDes.py
Created June 13, 2012 15:54 — forked from eigenein/pyDes.py
A pure python implementation of the DES and TRIPLE DES encryption algorithms
#############################################################################
# Documentation #
#############################################################################
# Author: Todd Whiteman
# Date: 16th March, 2009
# Verion: 2.0.0
# License: Public Domain - free to do as you wish
# Homepage: http://twhiteman.netfirms.com/des.html
#
@MartinThoma
MartinThoma / btree.py
Created July 22, 2012 13:30 — forked from teepark/btree.py
a pure-python B tree implementation
import bisect
import itertools
import operator
class _BNode(object):
__slots__ = ["tree", "contents", "children"]
def __init__(self, tree, contents=None, children=None):
self.tree = tree
self.contents = contents or []
@acdha
acdha / disable-vmware-proxy-apps.sh
Created August 8, 2012 14:58
Configure VMWare Fusion not to spam launch services with proxy apps for Windows applications
#!/bin/sh
#
# By default, VMWare Fusion creates proxy Mac apps for every application
# installed in a Windows VM, including all of the system utilities, installers &
# uninstallers, etc. I never use these and don't want them clogging up Launchbar,
# Spotlight or Launchpad and want to disable them for all of my VMs:
echo proxyApps.publishToHost = "FALSE" >> ~/Library/Preferences/VMware\ Fusion/preferences
echo proxyApps.publishToGuest = "FALSE" >> ~/Library/Preferences/VMware\ Fusion/preferences
@johntyree
johntyree / getBlockLists.sh
Last active August 30, 2025 06:36
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@FredEckert
FredEckert / framebuffer.c
Created August 22, 2012 13:15
Paint Pixels to Screen via Linux FrameBuffer
/*
To test that the Linux framebuffer is set up correctly, and that the device permissions
are correct, use the program below which opens the frame buffer and draws a gradient-
filled red square:
retrieved from:
Testing the Linux Framebuffer for Qtopia Core (qt4-x11-4.2.2)
http://cep.xor.aps.anl.gov/software/qt4-x11-4.2.2/qtopiacore-testingframebuffer.html
*/
@abeluck
abeluck / concat-mp4-annexb.md
Created September 20, 2012 17:50
Concat MP4 files using AnnexB bitstream format

Concat MP4 files without transcoding to mpeg

  1. Use the h264_mp4toannexb bitstream filter to convert the mp4s (video steam only) into the AnnexB bitstream format

    ffmpeg -i input1.mp4 -vcodec copy -vbsf h264_mp4toannexb -acodec copy part1.ts
    # repeat for up to inputN
    
  2. Concat the files using cat

@GaretJax
GaretJax / gist:3783042
Created September 25, 2012 16:42
HID Device to UDP
#import <Foundation/Foundation.h>
#import <IOKit/hid/IOHIDManager.h>
#import <IOKit/hid/IOHIDUsageTables.h>
#define KEYS 4
static void Handle_InputCallback(void *inContext, IOReturn inResult, void *inSender, IOHIDValueRef value)
{
IOHIDElementRef elem = IOHIDValueGetElement(value);