Skip to content

Instantly share code, notes, and snippets.

@Gohan
Gohan / keybase.md
Created October 24, 2016 13:49
keybase Prove

Keybase proof

I hereby claim:

  • I am gohan on github.
  • I am gohan (https://keybase.io/gohan) on keybase.
  • I have a public key whose fingerprint is FCD8 6589 1E88 06C9 7038 E8D4 30F0 1837 3405 6F25

To claim this, I am signing this object:

@Gohan
Gohan / codeship_android_build.sh
Created July 2, 2016 06:17 — forked from PuKoren/codeship_android_build.sh
Codeship Android build script
cd /tmp
pwd
#Download Android SDK from Google and unzip it
wget http://dl.google.com/android/android-sdk_r24.1.2-linux.tgz
tar zxvf android-sdk_r24.1.2-linux.tgz
rm android-sdk_r24.1.2-linux.tgz
#Set extracted SDK location to $PATH so we can use commands
export ANDROID_HOME="/tmp/android-sdk-linux"
export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH"
def new_counter(c):
counter = itertools.count(c)
def f():
return counter.next()
return f;
def new_counter(c):
counter = itertools.count(c)
return lambda x=0:counter.next()
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
Google Apps for Android 4.1 (https://www.androidfilehost.com/?fid=22979706399755082 - gapps-jb-20121011-signed.zip)
-Xms256m
-Xmx1024m
-ea
-server
-Dsun.io.useCanonCaches=false
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:+AggressiveOpts
@Gohan
Gohan / bootstrap.sh
Last active August 29, 2015 14:00
Ubuntu 12.04 bootstrap
#!/bin/bash
function Add_Sudo_NoPass {
echo "Add Sudo NoPass Option";
if [ -f "/etc/sudoers.tmp" ]; then
exit 1
fi
sudo touch /etc/sudoers.tmp
# Set default nopass for sudo
sudo cat /etc/sudoers | sed 's/^%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD:ALL/g' | tee /tmp/sudoers.new > /dev/null
sudo visudo -c -f /tmp/sudoers.new
@Gohan
Gohan / 0_reuse_code.js
Created April 22, 2014 06:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@Gohan
Gohan / jusplay.cpp
Created April 15, 2013 10:41
base, proxy
#include <cstdio>
class Base
{
public:
int Print()
{
return printf("Base\n");
}
};
@Gohan
Gohan / gist:4085033
Created November 16, 2012 07:13
Gohan's css modify from dilinger.io For md file rendering
<style type="text/css">
/* Gohan's css modify from dilinger.io */
[hidden]{display:none}
::-moz-selection{background:#087185;color:#fff;text-shadow:none}
::selection{background:#087185;color:#fff;text-shadow:none}
a:visited{color:#551a8b}
b{font-weight:bold}
dfn{font-style:italic}
hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}
ins{background:#ff9;color:#000;text-decoration:none}