Skip to content

Instantly share code, notes, and snippets.


Carlos David Aguilar Ruiz aguilarcarlos

View GitHub Profile
oodavid /
Last active Nov 2, 2020 — forked from aronwoost/
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
    • apache's home directory is /var/www/
jrust / README.markdown
Created Mar 13, 2012 — forked from pezholio/README.markdown
Bootstrap's Typeahead plugin extended (AJAX functionality, comma-separated values, autowidth, and autoselect)
View README.markdown

This is a fork of a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

  • Ability to disable autoselect of first matched element.
  • Ability to automatically set the width of the dropdown to that of the text input.
  • Ability to fetch source element via AJAX
  • Ability to have a comma separated list of tags.

For the proper source, and other examples, please see the original gist.

Example showing off all the above features

jexchan /
Created Apr 10, 2012
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C ""
smeranda / facebook_like-box_responsive.css
Created May 1, 2012
Flexible width layout for Facebook Like Box/Activity Stream to use in Responsive Designs
View facebook_like-box_responsive.css
Make the Facebook Like box responsive (fluid width)
/* This element holds injected scripts inside iframes that in some cases may stretch layouts. So, we're just hiding it. */
#fb-root {
display: none;
Mithrandir0x / gist:3639232
Created Sep 5, 2012
Difference between Service, Factory and Provider in AngularJS
View gist:3639232
// Source:!topic/angular/hVrkvaHGOfc
// jsFiddle:
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
zmsaunders / filters.php
Last active Dec 7, 2018
HTML Output Minification in laravel 4
View filters.php
### --- Snip --- ###
App::after(function($request, $response)
// HTML Minification
if(App::Environment() != 'local')
if($response instanceof Illuminate\Http\Response)
ilya-dev / app_self_update.php
Last active Mar 1, 2016
Raw prototype of an application updater
View app_self_update.php
<?php namespace Acme;
use Illuminate\Filesystem\Filesystem;
class Updater {
* The Filesystem instance
* @var Illuminate\Filesystem\Filesystem
CrocoDillon / cookies.js
Last active Oct 30, 2020
Export your awesome module using AMD, CommonJS, Node.js or just as global.
View cookies.js
* Inspiration (well… copy pasting more or less) from:
* Thanks Scott!
(function (global) {
'use strict';
var MyModule = function () {
paulirish /
Last active Nov 24, 2020
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
You can’t perform that action at this time.