Skip to content

Instantly share code, notes, and snippets.

View noct's full-sized avatar

Jason Kozak noct

View GitHub Profile
@noct
noct / post-update
Created September 9, 2014 04:31
git post-update hook
#!/bin/sh
out= # path goes here
branch=$(git rev-parse --symbolic --abbrev-ref $1)
export GIT_WORK_TREE=$out
git checkout -f $branch
git clean -fxd
$out/post-sync
@noct
noct / wordlist.txt
Created July 9, 2014 19:27
mnencode word list
abraham
absent
absorb
absurd
academy
accent
acid
acrobat
action
active
@noct
noct / gist:9884320
Created March 31, 2014 02:49
SDL2 Window Icon from resource
static void SDL_LoadWindowIcon(SDL_Window* window)
{
#if defined(_WIN32)
const unsigned int mask_r = 0x00ff0000;
const unsigned int mask_g = 0x0000ff00;
const unsigned int mask_b = 0x000000ff;
const unsigned int mask_a = 0xff000000;
const int res_id = 101;
const int size = 32;
const int bpp = 32;
set-option -g prefix C-a
bind-key C-a last-window
set -g base-index 1
set -s escape-time 0
set-window-option -g window-status-current-bg white
@noct
noct / .nanorc
Created December 13, 2013 04:38
.nanorc for linux
set autoindent
set smarthome
set smooth
set softwrap
set tabsize 4
@noct
noct / .gitconfig
Last active December 21, 2015 19:23
Git Config
[user]
name = unset
email = unset@url.com
[core]
autocrlf = false
preloadindex = true
[color]
ui = auto
[diff]
pager = less -x4
@noct
noct / ddms
Created January 6, 2013 21:06
ddms/monitor for win32/git-bash
#!/bin/bash
TOOLS_DIR=$ANDROID_HOME/tools
cd $TOOLS_DIR
ARCH=`java -jar lib/archquery.jar`
lib/monitor-$ARCH/monitor &
@noct
noct / ndk-gdb
Created January 3, 2013 03:41
ndk-gdb for win32/git-bash
#!/bin/bash
#
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@noct
noct / android
Created September 13, 2012 15:55
android for win32/git-bash
#!/bin/bash
TOOLS_DIR=$ANDROID_SDK_ROOT/tools
WORK_DIR=`pwd`
cd $TOOLS_DIR
JAR_PATH="lib\sdkmanager.jar;lib\swtmenubar.jar"
ARCH=`java -jar lib/archquery.jar`
SWT_PATH=lib/$ARCH
java -Dcom.android.sdkmanager.toolsdir="$TOOLS_DIR" -Dcom.android.sdkmanager.workdir=$WORK_DIR -classpath "$JAR_PATH;$SWT_PATH\swt.jar" com.android.sdkmanager.Main $@
@noct
noct / ndk-build
Created September 13, 2012 15:51
ndk-build for win32/git-bash
#!/bin/bash
NDK_ROOT=$ANDROID_NDK_ROOT
NDK_MAKE=$NDK_ROOT/prebuilt/windows/bin/make.exe
$NDK_ROOT/prebuilt/windows/bin/make.exe -f $NDK_ROOT/build/core/build-local.mk SHELL=cmd $@