Skip to content

Instantly share code, notes, and snippets.

View jwcastillo's full-sized avatar
🏠
Working from home

José Wenceslao Castillo jwcastillo

🏠
Working from home
View GitHub Profile
@jwcastillo
jwcastillo / master.blade.php
Last active August 27, 2015 22:03 — forked from ahuballah/master.blade.php
My master layout for Laravel based on the HTML5 BP.
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{ $title }}</title>
<meta name="description" content="">
@jwcastillo
jwcastillo / .bowerrc
Last active August 28, 2015 19:35 — forked from ericlbarnes/.bowerrc
Laravel Elixir With Bootstrap Sass
{
"directory": "vendor/bower_components"
}

Docker Cheat Sheet

Why

Why Should I Care (For Developers)

"Docker interests me because it allows simple environment isolation and repeatability. I can create a run-time environment once, package it up, then run it again on any other machine. Furthermore, everything that runs in that environment is isolated from the underlying host (much like a virtual machine). And best of all, everything is fast and simple."

TL;DR, I just want a dev environment

#############################################
# 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
Due Date Reminder plugin
Issue Hot Buttons Plugin plugin
Parent Ticket Fields plugin
Redmine Select2 plugin
Redmine Auto Watch plugin

Node.js - npm Cheat Sheet

(Full description and list of commands at - https://npmjs.org/doc/index.html)

##List of less common (however useful) NPM commands

######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:

#############################################
# 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
@jwcastillo
jwcastillo / localidadeschile.sql
Last active August 31, 2015 20:52
lista de localidades de Chile tipo Region, Provincia y Comunas, en una sola tabla de manera recursiva, basados en http://datos.gob.cl/datasets/ver/29596 y https://josearodrigueze.wordpress.com/2013/04/23/bd-pais-estado-municipio-parroquia/
-- Dumped database version 9.1.7 pg_dump version 9.1.7
-- Started on 2013-04-20 22:59:49 VET
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
@jwcastillo
jwcastillo / DB.sql
Last active September 1, 2015 14:16 — forked from msurguy/DB.sql
Dynamic dropdown in Laravel, let's say you have multiple drop downs (selects), you click on one and the contents of the other need to be dynamically changed. One solution is to dynamically load JSON from the API and change the dropdown dynamically depending on the user choice.
CREATE TABLE `makers` (
`id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
@jwcastillo
jwcastillo / gulpfile.js
Last active September 2, 2015 10:17 — forked from laracasts/gulpfile.js
Example Laravel-specific Gulpfile from Laracasts.com
var gulp = require('gulp');
var gutil = require('gulp-util');
var notify = require('gulp-notify');
var sass = require('gulp-ruby-sass');
var autoprefix = require('gulp-autoprefixer');
var minifyCSS = require('gulp-minify-css')
var coffee = require('gulp-coffee');
var exec = require('child_process').exec;
var sys = require('sys');