Skip to content

Instantly share code, notes, and snippets.

View amejiarosario's full-sized avatar
🎯
Think big, start small, learn fast!

Adrian Mejia amejiarosario

🎯
Think big, start small, learn fast!
View GitHub Profile
/**
* Module dependencies
*/
var express = require('express');
var fs = require('fs');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// img path
@amejiarosario
amejiarosario / .tmux.conf
Last active December 23, 2015 20:29
Tmux conf and cheatsheet
# start with index 1 instead of 0
set -g base-index 1
# active window title colors
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg blue
# Status Bar with Hours and seconds
set status-right '"#22T" %H:%M:%S %d-%b-%y'
## https://github.com/jnicklas/capybara
#=Navigating=
visit('/projects')
visit(post_comments_path(post))
#=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
@amejiarosario
amejiarosario / jenkins4rails.sh
Last active December 22, 2015 21:59
install jenkins for rails
### https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
### Start jenkins
sudo service jenkins start
@amejiarosario
amejiarosario / vi_cheatsheet.sh
Last active December 22, 2015 11:28
Vi cheatsheet from novice to pro!
# Get started with basic commands
# http://www.worldtimzone.com/res/vi.html
# Setup a VIM with plugins
curl -Lo- https://bit.ly/janus-bootstrap | bash
# Read documentation
# https://github.com/carlhuda/janus
# configuration for osx clipboard support
set-option -g default-command "reattach-to-user-namespace -l sh"
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- If you delete this tag, the sky will fall on your head -->
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ZURBemails</title>
<style data-inline="true">
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- If you delete this tag, the sky will fall on your head -->
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ZURBemails</title>
<style data-inline="true">
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- If you delete this tag, the sky will fall on your head -->
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ZURBemails</title>
<style data-inline="true">
curl -XDELETE http://localhost:9200/ac-test
#curl -XPUT http://localhost:9200/ac-test
# --- Mapping ---
curl -XPOST 'http://localhost:9200/ac-test
'{"mappings" : { {
"people" : {
"properties" : {
"firstNames" : {
"type" : "string"