Skip to content

Instantly share code, notes, and snippets.

@nddrylliog
nddrylliog / 32configure.sh
Last active December 21, 2015 19:39
Linux / Ubuntu 32-bit and 64-bit build / configure scripts
#!/bin/bash
export PREFIX="/home/amos/Dev/prefix32"
export CPPFLAGS="-I${PREFIX}/include"
export CFLAGS="-m32"
export CXXFLAGS="-m32"
export LDFLAGS="-m32 -L${PREFIX}/lib"
export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"
"$@" --prefix=${PREFIX}
@nddrylliog
nddrylliog / winbrew.md
Last active December 20, 2015 16:19
Winbrew
@nddrylliog
nddrylliog / stuff-to-put-on-ooc-lang.org.md
Created August 5, 2013 20:24
Stuff to put on ooc-lang.org

Stuff

  • Code samples
  • Get started in 5 minutes on: OSX, Linux, Windows (brew, etc.)
  • Using sam, using third-party libs, making your own lib
  • The llama seal of quality
  • Find your marks from C / Java / Python / Ruby ?
  • Link to / integrate: "the ooc language"?
  • Links to talks/slides
@flibitijibibo
flibitijibibo / GameName.sh
Created April 11, 2013 16:58
A variant of this launcher ships in every game I've worked on. While the filename here is GameName.sh, I do not use the .sh extension. Just `chmod +x` this and put your OSX bins in osx/, Linux 32-bit bins in x86/, and Linux 64-bit bins in x86_64/.
#!/bin/bash
# GameName Shell Script
# Written by Ethan "flibitijibibo" Lee
# Move to script's directory
cd "`dirname "$0"`"
# Get the kernel/architecture information
UNAME=`uname`
ARCH=`uname -m`
@nddrylliog
nddrylliog / coloredlogcat.py
Created February 13, 2013 00:33
Color adb logcat output a-la-irssi
#!/usr/bin/python
'''
Copyright 2009, 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
@nddrylliog
nddrylliog / android_toolchain.cmake
Created February 13, 2013 00:06
CMake toolchain for Android
# ------------------------------------------------------------------------------
# Android CMake toolchain file, for use with the Android NDK r5-r8
# Requires cmake 2.6.3 or newer (2.8.5 or newer is recommended).
# See home page: http://code.google.com/p/android-cmake/
#
# The file is mantained by the OpenCV project. And also can be found at
# http://code.opencv.org/projects/opencv/repository/revisions/master/changes/android/android.toolchain.cmake
#
# Usage Linux:
# $ export ANDROID_NDK=/absolute/path/to/the/android-ndk
@nddrylliog
nddrylliog / libyaml-android.md
Created February 3, 2013 00:42
Compiling libyaml 1.4 for Android

libyaml has a weird autotools configuration, and outdated config.guess / config.sub.

If you have a recent autotools, running autoreconf should be enough:

autoreconf --force --install --verbose --symlink
android_configure
make
make install
@nddrylliog
nddrylliog / android_configure.sh
Created February 1, 2013 00:51
Cross-compile autotools library for Android / arm-linux-androideabi I stick that in ~/bin/, chmod +x, and then run it in place of "./configure" in my project. Then a make and make install later, the prefix contains libraries built for android. Neato eh?
#!/bin/sh
# I put all my dev stuff in here
export DEV_PREFIX=$HOME/Dev/
# Don't forget to adjust this to your NDK path
export ANDROID_NDK=${DEV_PREFIX}/android-ndk-r8d/
export CROSS_COMPILE=arm-linux-androideabi
@nddrylliog
nddrylliog / .gvimrc
Last active December 11, 2015 11:19
My .vimrc - uses vundle to manage packages, tailored to ooc usage mostly
colorscheme jellybeans
" tab navigation like firefox
nnoremap <C-S-tab> :tabprevious<CR>
nnoremap <C-tab> :tabnext<CR>
nnoremap <C-t> :tabnew<CR>
inoremap <C-S-tab> <Esc>:tabprevious<CR>i
inoremap <C-tab> <Esc>:tabnext<CR>i
inoremap <C-t> <Esc>:tabnew<CR>
@nddrylliog
nddrylliog / justin.rb
Last active December 11, 2015 06:49
A ruby command-line justin.tv/twitch.tv player. Requires rtmpdump 2.4, uses mplayer by default.
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
require 'faraday'
# Script options
channel=ARGV[0]
stream=ENV['STREAM'] || "live"
player=ENV['PLAYER'] || "mplayer -quiet"