- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- index.html.erb --> | |
<% form_tag search_path do %> | |
<%= select :search, :state, State.all.collect { |m| [m.full_name, m.id] }.sort, {:prompt=>'Please Select...'} %> | |
<%= observe_field(:state, :url => { :action => :update_city_menu }, | |
:update => :city_field_div, | |
:with => :state | |
) %> | |
<div id="city_field_div"></div> | |
<%= submit_tag 'Submit' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$formMatch = array(); | |
$code = '<form name="otro_texto_que_sacare">texto_que_sacare</form>'; | |
preg_match_all("/<form (.*?)>(.*?)<\/form>/i", $code, $matches, PREG_SET_ORDER); | |
foreach ($matches as $data) | |
{ | |
print_r($data); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Install dependencies | |
yum update -y | |
yum install -y gcc apr-devel apr-util-devel openssl-devel pcre-devel libxml2-devel libcurl-devel | |
# Or just make your own installation for apr | |
mkdir setup && cd setup | |
wget <url_to_apache>.tar.gz | |
tar -zxvf <apache>.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCK FILE +, UNLOCK - chattr -i /etc/httpd/conf/httpd.conf | |
NETWORKING | |
ifconfig eth0 up | |
history | grep ifconfig | |
ifconfig eth0:1 <ip> | |
tracert <domain> | |
watch "echo stats | nc 127.0.0.1 11211" | |
FILE PERMISSIONS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT | |
=== | |
[PUBLIC REPO] https://www.kernel.org/pub/software/scm/git/ | |
[DELETE ALL RM] git rm $(git ls-files --deleted) | |
[DELETE BRANCH DOWN] git branch <branchName> --delete | |
[DELETE BRANCH UP] git push origin --delete <branchName> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------- | |
Configuracion Basica | |
-------------------- | |
//Configurarar Nombre que salen en los commits\\ | |
git config --global user.name "daniel sanchez" | |
//Configurar Email\\ | |
git config --global user.email [email protected] | |
//marco de colores para los comandos\\ | |
git config --global color.ui true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config valid only for Capistrano 3.1 | |
lock '3.2.1' | |
# APPLICATION | |
set :application, '<application_name>' | |
set :repo_url, '<repo>' | |
# GIT | |
set :deploy_to, '<deploy_to>' | |
set :deploy_via, :remote_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* * ** | |
* | |
* This script converts an existing MySQL database to migrations in Laravel 4. | |
* | |
* 1. Place this file inside app/controllers/ | |
* | |
* 2. In this file, edit the index() method to customize this script to your needs. | |
* - inside $migrate->ignore(), you pass in an array of table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer