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 / load-env.sh
Last active November 24, 2017 13:15
Load env regardless before app starts
env $(cat .env) node app.js
@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 / 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 / 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 / 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 / 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 / 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 / a.js
Created April 7, 2017 16:18
laju
Account.find({help:'ph'}).then(data=>data.forEach(account=>{Promise.all([ProvideHelp.findOne({account:account.id}),GetHelp.findOne({account:account.id})]).then(data=>{var ph=data[0],gh=data[1];if(!ph&&!gh){ProvideHelp.create({account:account.id,level:account.level}).then(d=>console.log(d))}})}));
@robophil
robophil / AndroidManifest.xml
Last active April 7, 2017 12:58
Sample <activity> tag to handle deep linking for payporte.com mobile app. See https://developer.android.com/training/app-indexing/deep-linking.html
<activity
android:name="com.payporte.mobile.ProductActivity"
android:label="@string/category_title" >
<intent-filter android:label="@string/filter_title_product">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "http://www.payporte.com/category” -->
<data android:scheme="http"
android:host="www.payporte.com"
package com.payporte.mobile.activity;
import android.os.Bundle;
public class ProductActivity extends AppCompatActivity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.product);