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
- Comment a block of code
https://unix.stackexchange.com/a/120617/72893
- Indent a block of code
https://stackoverflow.com/a/235841/1446845
(basically 5>> to comment the next 5 lines)
@nobitagit
nobitagit / .gitignore_global
Created January 3, 2018 16:17
.gitignore_global
# You may already have a global gitignore file
# run:
# git config --get core.excludesfile
# to see its location
*~
.DS_Store
*.swp
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@nobitagit
nobitagit / reborn.sh
Last active January 16, 2019 14:40
Just in case i need to resurrect my laptop.
echo "Starting"
echo "Getting Homebrew"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Show dotfiles by default
defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder
# get Vundle
@nobitagit
nobitagit / lodash-fp-documentation.md
Created October 4, 2017 15:18 — forked from jfmengels/lodash-fp-documentation.md
Generated docs for Lodash/fp. Help make them better at https://github.com/jfmengels/lodash-fp-docs
@nobitagit
nobitagit / fresh-chrome-with-custom-tz.sh
Created October 2, 2017 08:57 — forked from prasadsilva/fresh-chrome-with-custom-tz.sh
Launch new instances of Google Chrome on OS X with isolated cache, cookies, user config and custom Timezone
#!/usr/bin/env bash
# fresh-chrome
#
# Use this script on OS X to launch a new instance of Google Chrome
# with its own empty cache, cookies, and user configuration.
#
# The first time you run this script, it will launch a new Google
# Chrome instance with a permanent user-data directory, which you can
# customize below. Perform any initial setup you want to keep on every
@nobitagit
nobitagit / destructuring.js
Created July 24, 2017 15:54 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
@nobitagit
nobitagit / api_server.js
Last active July 9, 2017 18:07
Solving some of Learnyounode's problems using events
/*
## HTTP JSON API SERVER (Exercise 13 of 13)
Write an HTTP server that serves JSON data when it receives a GET request
to the path '/api/parsetime'. Expect the request to contain a query string
with a key 'iso' and an ISO-format time as the value.
For example:
'use strict';
class Abstract {
// A static abstract method.
static foo() {
if (this === Abstract) {
// Error Type 2. Abstract methods can not be called directly.
throw new TypeError("Can not call static abstract method foo.");
} else if (this.foo === Abstract.foo) {
// Error Type 3. The child has not implemented this method.
throw new TypeError("Please implement static abstract method foo.");
@nobitagit
nobitagit / index.js
Created May 28, 2017 15:26
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var $ = require("jquery");
var Bacon = require('baconjs');
const counter = $('#counter');
const plus = $('#plus');
const minus = $('#minus');
// map event to stream