Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block antoni

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
antoni /
Created Apr 13, 2014
Pulls SQlite database from Android device
ADB_PATH=`which adb`
if [ $? -ne 0 ]
echo "Could not find adb!"
exit 1

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
View portable_endian.h
// "License": Public Domain
// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like.
// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to
// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it
// an example on how to get the endian conversion functions on different platforms.
#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__)
# From Introduction to Play Framework with Scala course
set -eo pipefail
function help {
echo "Download or update Typesafe Activator on Linux and Cygwin"
echo "Usage: $(basename $0) [options]"
echo "Options are:"
View lxc-centos
# template script for generating CentOS container for LXC
# lxc: linux Container library
# Authors:
antoni /
Created May 21, 2015
Various bash scripts
# (1) mv with regexp
for i in *; do mv -n "$i" "${i/_*dpi*}".png; done;
# (2) Loop over array of strings
declare -a arr=("element1" "element2" "element3")
## now loop through the above array
for i in "${arr[@]}"
echo "$i"
# Time functions
import timeit
timeit.timeit(a, number=1)
antoni / cuda.snippets
Last active Aug 29, 2015
CUDA snippets for Vim, should be put in: `~/.vim/bundle/vim-snippets/snippets`
View cuda.snippets
extends cpp
## CUDA Functions
snippet sync
snippet thsync
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
antoni / union_endianness.c
Created Jul 9, 2015
Detecting endianness at runtime
View union_endianness.c
* Source:
int is_big_endian(void)
union {
uint32_t i;
char c[4];
You can’t perform that action at this time.