Skip to content

Instantly share code, notes, and snippets.

View robophil's full-sized avatar
🍷
Working from home

Balogun Oghenerobo Philip robophil

🍷
Working from home
View GitHub Profile
@robophil
robophil / waterline-express-example.js
Last active May 30, 2017 14:28
using waterline with express
/**
* A simple example of how to use Waterline v0.10 with Express
*/
var _ = require('lodash');
var Waterline = require('waterline');
// Instantiate a new instance of the ORM
@robophil
robophil / installvagrant
Created June 2, 2017 15:17 — forked from rrgrs/installvagrant
installs brew, virtualbox, and vagrant in osx
if ! type "brew" > /dev/null; then
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)";
fi
brew tap phinze/homebrew-cask && brew install brew-cask;
brew cask install vagrant;
brew cask install virtualbox;
@robophil
robophil / install-elastic-1.5.2-basic-auth
Created June 7, 2017 14:43 — forked from phamquick/install-elastic-1.5.2-basic-auth
Install ElasticSearch 1.5.2 + Basic Auth on Centos 6.x Server
sudo su
yum update -y
#*************** INSTALL JAVA JDK 8*********************#
yum install java-1.8.0-openjdk -y
#*************** INSTALL ELASTICSEARCH 1.5.2 + RECOMMENDED PLUGINS *********************#
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.5.2.noarch.rpm
yum install elasticsearch-1.5.2.noarch.rpm -y
rm -f elasticsearch-1.5.2.noarch.rpm
@robophil
robophil / contact-manager.js
Created July 24, 2017 00:27
Simple approach to mapping contact data
const contacts = [{id: 1, name: "DF lade", country: "nig", no: 090}, {id: 2, name: "Miss Akesuwa", country: "nig", no: 090}, {id: 3, name: "wendy", country: "nig", no: 090}, ]
const message = `Hello {{name}}, welcome to {{country}}`
function validate(message){
return true
}
const contactKeys = Object.keys(contacts[0])
@robophil
robophil / gist:b3be8492a423db2af6f034b708a1e7fe
Created September 29, 2017 09:11 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@robophil
robophil / NERDTree.mkd
Created November 22, 2017 13:35 — forked from m3nd3s/NERDTree.mkd
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

@robophil
robophil / load-env.sh
Last active November 24, 2017 13:15
Load env regardless before app starts
env $(cat .env) node app.js
@robophil
robophil / promisesEM.md
Created January 18, 2018 10:14 — forked from dmvaldman/promisesEM.md
Promises as EventEmitters

Promises as EventEmitters

I was trying to understand JavaScript Promises by using various libraries (bluebird, when, Q) and other async approaches.

I read the spec, some blog posts, and looked through some code. I learned how to

@robophil
robophil / .bashrc
Last active January 23, 2018 22:22
cuda
export PATH=/usr/local/cuda-9.1/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
// GET https://api.fixer.io/latest?base=USD
{
"base": "USD",
"date": "2018-01-30",
"rates": {
"AUD": 1.2354,
"BGN": 1.5746,
"BRL": 3.1624,
"CAD": 1.2321,
"CHF": 0.93302,