Skip to content

Instantly share code, notes, and snippets.

View edderrd's full-sized avatar

Edder Rojas edderrd

View GitHub Profile
@edderrd
edderrd / jquery.ba-tinypubsub.js
Created March 8, 2012 18:58 — forked from cowboy/HEY-YOU.md
Javascript: JQuery Pubsub
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
@edderrd
edderrd / API.md
Created November 27, 2012 15:47 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@edderrd
edderrd / .txt
Created July 24, 2013 00:25 — forked from roybarber/.gitignore
Ignore file for wordpress
# Don't add the Local settings file to the repository #
htdocs/wp-config-local.php
# If using SASS to compile stylesheets this saves conflicts, plus there not needed! #
htdocs/wp-content/themes/YOURTHEME/.sass-cache/*
# No need to add the upgrade folder to the repo #
htdocs/wp-content/upgrade/*
# sitemaps not needed locally #
@edderrd
edderrd / Capfile
Last active December 23, 2015 13:09 — forked from purwandi/deploy.rb
Capistrano Deployment for laravel 4
load "deploy"
set :application, "App Name" # Your app name
set :repository, "[email protected]:xxxxx/xxx.git" # Your git repository
set :user, "user_ssh"
set :document_root, "/home/#{user}/www/awesome_app"
set :deploy_via, :remote_cache
# SSH Settings
@edderrd
edderrd / finished.rb
Last active December 27, 2015 14:59 — forked from ttscoff/finished.rb
#!/usr/bin/ruby
# finished: a quick script to notify you when a command is done using Mountain Lion notifications
# It grabs the current folder as the title and takes one argument as the message
# Example: make && make install && finished "Done compiling" || finished "compiler failed"
#
# Needs the terminal-notifier gem : `gem install terminal-notifier`
# Can alternately be used with the CLI <https://github.com/alloy/terminal-notifier>
# (remove require block below and swap comment lines at the bottom)
require 'rubygems'
@edderrd
edderrd / 0_reuse_code.js
Created November 28, 2013 17:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/bin/bash
# vvv execute it directly vvv
# wget -O - https://gist.githubusercontent.com/edderrd/7451da41d049460f291d/raw/7360ed286a77ffafed43c4c3b829dbead72d940d/installtmux.sh | bash
wget http://downloads.sourceforge.net/tmux/tmux-1.8.tar.gz
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
[ -e tmux-1.8.tar.gz -a -e libevent-2.0.21-stable.tar.gz ] || {
echo "ERROR: Archive not found"
@edderrd
edderrd / slackpost
Last active February 20, 2018 14:08 — forked from dopiaza/slackpost
#!/bin/bash
# Usage: slackpost <message>
# Enter the name of your slack host here - the thing that appears in your URL:
# https://slackhost.slack.com/
webhook=PUT_YOUR_HOST_HERE
shift
@edderrd
edderrd / install-tmux
Last active April 16, 2018 23:29 — forked from rothgar/install-tmux
# Install tmux on Centos release 6.6
# wget -O - https://gist.githubusercontent.com/edderrd/ffc8b4b166345d399ce6/raw/9952c2381ecf5fa61665be9d6cf03e0b2c534a29/install-tmux | bash
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar -xf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable