Skip to content

Instantly share code, notes, and snippets.

Carlos David Aguilar Ruiz aguilarcarlos

Block or report user

Report or block aguilarcarlos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aguilarcarlos
aguilarcarlos / videos.json
Last active Jun 3, 2018 — forked from jsturgis/gist:3b19447b304616f18657
Creative Commons Videos
View videos.json
{
"categories":[
{
"name":"Movies",
"videos":[
{
"description":"Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources":[
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
],
@aguilarcarlos
aguilarcarlos / videos.txt
Created Jan 22, 2018 — forked from manico/videos.txt
Public Videos
View videos.txt
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/SubaruOutbackOnStreetAndDirt.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/TearsOfSteel.mp4
@aguilarcarlos
aguilarcarlos / what-forces-layout.md
Created Aug 17, 2017 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.
View what-forces-layout.md

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.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@aguilarcarlos
aguilarcarlos / cookies.js
Created Aug 14, 2017 — forked from CrocoDillon/cookies.js
Export your awesome module using AMD, CommonJS, Node.js or just as global.
View cookies.js
/*
* Inspiration (well… copy pasting more or less) from:
* https://github.com/ScottHamper/Cookies/blob/0.3.1/src/cookies.js#L127-L140
*
* Thanks Scott!
*/
(function (global) {
'use strict';
var MyModule = function () {
@aguilarcarlos
aguilarcarlos / swipe.js
Last active Jul 12, 2016
Swipe JS for Mobile App
View swipe.js
/**
* @name _swipe
* Small event handler for swipe in mobile phones using javascript, this handler is based on http://stackoverflow.com/a/27115070
* This handler supports classes, ids and elements.
* @author David Aguilar
* @example
*
* _swipe("#element", function(dir, elem) {
* console.info("You're swiping to %s direction.", dir.type);
* });
@aguilarcarlos
aguilarcarlos / multiple_ssh_setting.md
Created May 26, 2016 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts
View multiple_ssh_setting.md

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 "your_email@youremail.com"
@aguilarcarlos
aguilarcarlos / app_self_update.php
Last active Sep 10, 2015 — forked from ilya-dev/app_self_update.php
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
@aguilarcarlos
aguilarcarlos / TipsForGit.md
Last active Jul 30, 2016
Fixing untracked files
View TipsForGit.md

Some tips for Git to Save your Life 👍

Rest branch to spefic commit or last commit

Firstly you need select th commit desired or simply reset the HEAD in current branch, (can check if you are in current branch using git branch.

git reset HEAD^ --hard // Or git reset +[commit]^ --hard

After that we need to force push doing this way:

View gist:7922341
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas
View README.md

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/
You can’t perform that action at this time.