Skip to content

Instantly share code, notes, and snippets.

View hSATAC's full-sized avatar
🐈
Cataholic

Ash Wu hSATAC

🐈
Cataholic
View GitHub Profile
package main
import (
"fmt"
"log"
"os"
"runtime"
"runtime/debug"
"runtime/pprof"
"strconv"
@hSATAC
hSATAC / uniqush-push
Last active August 29, 2015 14:20 — forked from couraudt/uniqush-push
#!/bin/sh
### BEGIN INIT INFO
# Provides: uniqush-push
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts uniqush-push
# Description: Starts Uniqush provides a unified push service for server-side notification to apps on mobile devices.
### END INIT INFO
@hSATAC
hSATAC / .gitignore
Last active August 29, 2015 14:28 — forked from monde/.gitignore
Micro Gem to get an OAuth token and secret for the Tumblr.com API allowing an external application to post Tumblr.com blog.
Gemfile.lock
@hSATAC
hSATAC / rand_element.sh
Created September 15, 2015 17:45
random element
#!/bin/bash
rand() {
echo $(( $1 * RANDOM / 32768 ))
}
rand_element () {
local -a th=("$@")
echo "${th[$( rand ${#th[@]} )]}"
}
@hSATAC
hSATAC / gist:99bf00ea75443d3b4a15
Created September 21, 2015 11:38
Fix unable to mount boot
# Boot from USB...
mkdir /mnt/arch
cd /mnt/arch
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
chroot . /bin/bash
mount -a
pacman -S linux
@hSATAC
hSATAC / boot2docker-nfs.rb
Last active September 24, 2015 10:28 — forked from mattes/boot2docker-nfs.rb
docker-machine/ boot2docker with NFS instead of vboxsf
#!/usr/bin/env ruby
# Usage
# $ docker-machine create my-machine123 -d virtualbox
# $ ruby <(curl -L https://git.io/vZT32) my-machine123
# https://gist.github.com/hSATAC/ac91f6cdc88c5a12ed5a
require 'erb'
bootlocalsh = %Q(#/bin/bash
@hSATAC
hSATAC / git_tips.md
Created April 30, 2011 08:06 — forked from fguillen/git_tips.md
Git Tips

(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )

Git tips

Global git user

git config --global user.name "Fernando Guillen"
git config --global user.email "fguillen.mail+spam@gmail.com"

Repository git user

cd /develop/myrepo

@hSATAC
hSATAC / gist:1249910
Created September 29, 2011 03:26
Google bookmark bookmarklet
javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk="+c(b.location)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=420px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();
/*!
*
* Imgur CORS Image upload
*
* Author & Copyright: timdream (timdream@gmail.com; http://timdream.org/)
* License: MIT LICENSE
*
*/
"use strict";
@hSATAC
hSATAC / USAGE.md
Created November 15, 2011 07:03 — forked from kossnocorp/USAGE.md
MacVim with Drawer compile manual

Clone & Build

curl https://gist.github.com/raw/970438/caff9a09ed2d223b1123a69ede17cb19ad352af9/build.sh | sh