Skip to content

Instantly share code, notes, and snippets.

View code7day's full-sized avatar

Edu. Flores code7day

View GitHub Profile
@code7day
code7day / tornado-nginx-example.conf
Created October 9, 2012 06:16 — forked from didip/tornado-nginx-example.conf
Nginx config example for Tornado
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
@code7day
code7day / jqueryvalidate-dni.js
Created April 17, 2016 06:26 — forked from fjaguero/jqueryvalidate-dni.js
JS: jQuery Validate - Validate DNI
jQuery.validator.addMethod("DNI", function(value, element) {
var cadenadni="TRWAGMYFPDXBNJZSQVHLCKET";
var let = value.substr(value.length-1,1);
if(/^([0-9]{8})*[a-zA-Z]+$/.test(value)){
var numero = value.substr(0,value.length-1) % 23;
letra=cadenadni.substring(numero,numero+1);
if (letra==let)
return true;
return false;
} else if (/^[XYZ]{1}/.test(value)) {
@code7day
code7day / gist:8adf13c5d208ee347af482b329496d22
Created May 8, 2016 17:50 — forked from maccath/gist:3981205
Split PDF to individual pages using FPDI and FPDF
<?php
/**
* Split PDF file
*
* <p>Split all of the pages from a larger PDF files into
* single-page PDF files.</p>
*
* @package FPDF required http://www.fpdf.org/
* @package FPDI required http://www.setasign.de/products/pdf-php-solutions/fpdi/
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew cask install iterm2
# update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts
brew install bash # latest version of bash
# set brew bash as default shell
brew install fortune
brew install cowsay
brew install git

Dev Setup

  1. Homebrew/terminal/bash
  2. OSX Productivity - Window Management/Quick Launcher/Hyperswitch
  3. OSX Settings - Dock/Finder
  4. Web Browser - Extensions - AdBlock, Privacy Badger, OneTab, JSONViewer, Stylus, Vue Devtools, React Devtools
  5. Node.js - nvm
  6. Code Editor - vs code
  7. Code Editor Extensions
  8. Break timer and Flux
alexcvzz.vscode-sqlite
andys8.jest-snippets
apollographql.vscode-apollo
austincummings.razor-plus
bobsparadox.seti-black
BriteSnow.vscode-toggle-quotes
christian-kohler.npm-intellisense
christian-kohler.path-intellisense
CoenraadS.bracket-pair-colorizer
dbaeumer.vscode-eslint