Skip to content

Instantly share code, notes, and snippets.

View nckg's full-sized avatar

Nick Goris nckg

  • Pixeo
  • Belgium
View GitHub Profile
@nckg
nckg / valet.conf
Created May 31, 2018 12:40 — forked from poul-kg/valet.conf
CORS Rules for Laravel Valet Nginx
# To enable CORS you should add lines with CORS rules below to your valet.conf file
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory
# after you edit your valet.conf do not forget to execute `valet restart`
server {
listen 80 default_server;
root /;
charset utf-8;
client_max_body_size 128M;
@nckg
nckg / UpdateCSS.js
Created August 24, 2012 13:19 — forked from tmcls/UpdateCSS.js
Run this jQuery script to update your css. Be creative and create a bookmarklet from it ;-)
$("link[rel=stylesheet]").each(function(){
var url = $(this).attr('href');
url = url.replace(/\?tcnc=\d+/,'').replace(/\&tcnc=\d+/,'');
url += (url.indexOf('?')>0 ? '&' : '?') + 'tcnc=' + (new Date()).getTime();
$(this).attr('href', url);
console.log('[UPDATED CSS] '+ url);
});
# Makes Sinatra support multiple view paths.
# Usage:
#
# class Main < Sinatra::Base
# register Sinatra::MultiView
#
# get '/' do
# locals = { :name => current_user.name }
#
# # Instead of `haml 'home', {}, locals`
@nckg
nckg / osx_lion_rail_setup.md
Created March 27, 2012 14:27 — forked from jpantuso/osx_lion_rail_setup.md
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL