Skip to content

Instantly share code, notes, and snippets.

View zamicol's full-sized avatar
🇺🇸

Zach Collier zamicol

🇺🇸
View GitHub Profile
Int is basically a int32 or int64 based on archetecture.
https://play.golang.org/p/r4JecLQ-Oo
@zamicol
zamicol / kill_spaces_long_live_tabs_in_atom.md
Last active April 9, 2017 19:33
How to kill spaces as indent in Atom. Long live tabs!
In Edit -> Preferences -> "editor" tab
1. Uncheck "Soft Tabs".
2. Change "Tab Length" to `2`.
3. "Tab Type" to `hard`.
Put the following at $atom/config.cson
```
@zamicol
zamicol / select2_ajax.js
Last active March 8, 2017 17:49
Select2 Ajax with new option and font awesome spinner.
// "use strict";
// Fast style
// .fast-spin {
// -webkit-animation: fa-spin .2s infinite linear;
// animation: fa-spin .2s infinite linear;
// }
function initSelect2() {
var $search = $('<span><i class="fa fa-circle-o-notch fast-spin"></i> Updating...</span>');
@zamicol
zamicol / select2_ajax.js
Last active March 2, 2017 21:37
Simple Ajax with New Option for Select2 4
function initSelect2() {
$('.select2picker').select2({
ajax: {
url: "", //put the RUL here.
dataType: 'json',
delay: 50,
data: function(params) { // Build the search URL
return {
filter: params.term // Search term, in this case "filter".
var originalXhr; //Before jquery does it's processing.
$.ajax({
type: "POST",
url: link,
xhr: function () {
originalXhr = jQuery.ajaxSettings.xhr();
return originalXhr;
},
data: value,
sudo tcpdump -i lo0 -s 0 -A
//lo0 is interface (ifconfig to see what your "localhost" interface is)
//-A to print packets in ASCII
@zamicol
zamicol / tmux-cheatsheet.markdown
Last active June 5, 2016 03:03 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

attach:

tmux a  (#)  (or at, or attach)
@zamicol
zamicol / gox typical build with output directory
Created March 29, 2016 23:01
How to build to an output directory with gox for golang
gox -output="bin/{{.Dir}}_{{.OS}}_{{.Arch}}" -os="linux windows"
@zamicol
zamicol / Zamicol onename
Created March 29, 2016 17:08
Onename verification for Zamicol
Verifying that +zamicol is my blockchain ID. https://onename.com/zamicol
@zamicol
zamicol / onename.txt
Created March 29, 2016 17:03
One name verification
Verifying that +zachcollier is my blockchain ID. https://onename.com/zachcollier