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 / parse_url.php
Created March 14, 2012 20:57
PHP: Parse url params
<?php
/**
* Parses a url to extract the query parameters from it as a assoc array
* @param string $url
* @param bool $decode (optional) apply url decode
* @return array
*/
function parseUrl($url, $decode = false)
{
@edderrd
edderrd / html: bostrap basic page layout.html
Created May 10, 2012 23:07
html: bootstrap topbar layout
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PROJECT</title>
<meta name="description" content="Edder Rojas Project">
<meta name="author" content="Edder Rojas">
<!—[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]—>
@edderrd
edderrd / bootstrap-extras.css
Created May 11, 2012 04:37
css: bootstrap extras styles
body { position: relative; padding-top: 90px; }
/* Responsive tests
------------------------- */
.responsive-utilities-test {
margin-top: 5px;
margin-left: 0;
list-style: none;
overflow: hidden; /* clear floats */
}
@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 / edder.zsh-theme
Created August 22, 2013 17:15
Edder's ZSH Theme, supporting: - More verbosed git status with dot colors and arrows - Shows a cloud when is connected though ssh - Optionally show the user by (DEFAULT_USER) configuration on your zshrc file - Optionally show the hostname by (SHOW_HOST) configuration on your zshrc file
function ssh_connection() {
if $SHOW_HOST ; then
HOSTER="%{$fg[yellow]%}%m "
else
HOSTER=""
fi
if [[ -n $SSH_CONNECTION ]]; then
echo "%{$fg[cyan]%}☁ $HOSTER"
fi
}
@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