Skip to content

Instantly share code, notes, and snippets.

View sergixnet's full-sized avatar

Sergio Peña sergixnet

View GitHub Profile
@JamsMendez
JamsMendez / ngUploadDrop.js
Created August 12, 2014 05:00
Directiva de Angular.js para subir archivos Drag on Drop
directives.uploadDrop = function (){
return {
require: '?ngModel',
restrict: 'E',
template: '<div class="input-file" style="width: 150px;"><span class="glyphicon glyphicon-picture"></span></div>',
link: function (scope, element, attrs, ngModel){
if (!ngModel) return;
element.bind('drop', function (event) {
@bitchwhocodes
bitchwhocodes / gist:aa9d3426d35a09ef3918
Created December 22, 2014 02:20
Arduino Avoid Delay
unsigned long interval=50; // the time we need to wait
unsigned long previousMillis=0;
void setup(){
}
void loop(){
if ((unsigned long)(millis() - previousMillis) >= interval) {
previousMillis = millis();
Estando aquí en Santander,
yo mi poema os relato,
Y quisiera en este rato,
expresar mi admiración,
por tan gran contribución,
de anónimos usuarios,
que sin lucro desarrollan,
WordPress y su base de datos.
La conforman doce tablas,
@jelmerdemaat
jelmerdemaat / gist:4107273
Created November 18, 2012 20:37
JavaScript hasClass, addClass, removeClass
// JavaScript hasClass, addClass, removeClass
//source: http://www.avoid.org/?p=78
function hasClass(el, name) {
return new RegExp('(\\s|^)'+name+'(\\s|$)').test(el.className);
}
function addClass(el, name)
{
if (!hasClass(el, name)) { el.className += (el.className ? ' ' : '') +name; }
@mathetos
mathetos / custom_the_content.php
Last active July 17, 2017 09:53
Adding Custom Class to the_content
<?php
//Adding custom class to posts is easy with the post_class filter
add_filter('post_class', 'custom_content_class');
function custom_content_class($classes) {
$classes[] = 'custom_class';
return $classes;
}

Libros de la charla iniciación al diseño

Sistema de retículas por Josef Muller-Brockmann

Manual de tipografía por John Kane

Interacción del color por Josef Albers

Design for Hackers: Reverse Engineering Beauty por David Kadavy

@soncco
soncco / 1. django+gunicorn+nginx
Last active September 16, 2017 22:08
Manera fácil de hacer Deploy con Django en un VPS.
# Create sudo user
adduser <user>
usermod -a -G sudo <user>
logout
# Update and clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
@hubertursua
hubertursua / node-forever-upstart.conf
Last active December 7, 2018 17:53
NodeJS, Forever, and Upstart (Ubuntu)
#!upstart
start on filesystem and started networking
stop on shutdown
expect fork
setuid ubuntu
env HOME="/home/ubuntu"
@phuongtailtranminh
phuongtailtranminh / Backup and Restore Linux Server
Last active August 5, 2019 14:47
Backup and Restore Ubuntu Server
Backup: sudo tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/boot --one-file-system /
Restore: sudo tar -xvpzf /path/to/tar/file -C / --numeric-owner