Skip to content

Instantly share code, notes, and snippets.

View nobitagit's full-sized avatar
🕸️
The less I know the better

Aurelio nobitagit

🕸️
The less I know the better
View GitHub Profile

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am

@nobitagit
nobitagit / style.less
Last active August 29, 2015 14:17
my atom styles overrides
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*
* save as ~/.atom/style.less
@nobitagit
nobitagit / fetch.js
Last active August 29, 2015 14:17
Fetch example
/**
* Browser must support Promises and Fetch, otherwise include this polyfill:
<script src="https://cdn.jsdelivr.net/polyfills/polyfill.js+promise,fetch"></script>
**/
var endpoint = 'https://api.github.com/repos/nobitagit/material-floating-button/stats/commit_activity';
fetch(endpoint).then(function(response){
console.log(response);
return response.json();
@nobitagit
nobitagit / countries.json
Created April 28, 2015 17:34
list of countries with nation code
[
{"name": "Afghanistan", "code": "AF"},
{"name": "Åland Islands", "code": "AX"},
{"name": "Albania", "code": "AL"},
{"name": "Algeria", "code": "DZ"},
{"name": "American Samoa", "code": "AS"},
{"name": "AndorrA", "code": "AD"},
{"name": "Angola", "code": "AO"},
{"name": "Anguilla", "code": "AI"},
{"name": "Antarctica", "code": "AQ"},
{
"auto_match_enabled": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/defaulted/Re-Base16 Eighties Dark-Babel.tmTheme",
"create_window_at_startup": false,
"detect_indentation": true,
"detect_slow_plugins": false,
"drag_text": false,
"draw_white_space": "all",
sudo vim /etc/hosts
# redirect to local
127.0.0.1 local.yoursite.com
# start a server and then
# visit: local.yoursite.com:8080
# and see your local file being served
@nobitagit
nobitagit / chmod.sh
Last active September 6, 2017 20:36
some unix commands i frequently use/sometimes forget
A basic `chmod` recap:
stuff like `chmod a+x fileName` ecc http://www.thegeekstuff.com/2010/06/chmod-command-examples
@nobitagit
nobitagit / hash-reduce.js
Last active August 29, 2015 14:26
A simple Hash table implementation with reduce
// A simple Hash table implementation with reduce
// see more here: https://www.youtube.com/watch?v=t4MOEfpsC60
var url = 'http://www.json-generator.com/api/json/get/ckmEptKGjS?indent=2'
, data
fetch(url).then(function(resp){
return resp.json();
}).then(function(resp){
data = resp;
@nobitagit
nobitagit / hashtable.js
Created August 15, 2015 20:18
hashtable in js
var HashTable = function (key) {
this.store = {};
this.key = key;
};
HashTable.prototype = {
getItem : function (key) {
return this.store[key];
},
@nobitagit
nobitagit / .gitconfig
Last active January 18, 2017 18:02
My ~/.gitconfig aliases
# my ~/.gitconfig aliases
[alias]
st = status
ci = commit
co = checkout
br = branch
lol = log --oneline
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
doh = reset --soft HEAD~1
# show the branches sorted by modified date (older to recent)