Skip to content

Instantly share code, notes, and snippets.

View luisdalmolin's full-sized avatar
👨‍💻

Luís Dalmolin luisdalmolin

👨‍💻
View GitHub Profile
@luisdalmolin
luisdalmolin / deploy.sh
Created April 18, 2013 18:29
Deploy via GIT with composer update and database migration and seed.
$ git deploy
Counting objects: 41, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (24/24), done.
Writing objects: 100% (25/25), 5.39 KiB, done.
Total 25 (delta 12), reused 0 (delta 0)
remote: Loading composer repositories with package information
Updating dependencies
remote: Generating autoload files
remote: Generating optimized class loader...
@luisdalmolin
luisdalmolin / Gruntfile.js
Created May 6, 2013 23:53
Grunt Boilerplate
module.exports = function(grunt) {
grunt.initConfig({
coffee: {
compile: {
files: {
'assets/js/main.js': 'assets/js/coffee/main.coffee',
}
}
},
[Exception]
DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() functi
on. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, bu
t please set date.timezone to select your timezone.
@luisdalmolin
luisdalmolin / gradient.scss
Created June 5, 2013 20:44
Compass Gradient CSS3 function
@mixin gradient($color-start, $color-stop, $direction: top) {
background-color: $color-stop;
@include background-image(linear-gradient($direction, $color-start, $color-stop));
}
Verifying that +luisdalmolin is my blockchain ID. https://onename.com/luisdalmolin
@luisdalmolin
luisdalmolin / worker.js
Last active August 30, 2016 11:58
Service Worker to make the site offline
var version = 'v1::';
// -------------------------------------------------------
// aqui devem ser baixados os recursos offline, que devem vir de uma lista em algum local
// provavelmente alguma API no site
this.addEventListener('install', function(event) {
console.log('Service Worker instalado!');
// return self.clients.skipWaiting();
});
PagSeguroDirectPayment.getBrand({
cardBin: $scope.card,
success: function(response) {
console.log(response);
},
error: function(response) {
console.log(response);
}
@luisdalmolin
luisdalmolin / nginx.conf
Created March 28, 2017 12:11
Nginx cache config
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|woff|woff2|css|js)$ {
expires 30d;
access_log off;
add_header Pragma public;
add_header Cache-Control "public";
}
# cache.appcache, your document html and data
location ~* \.(?:manifest|appcache|html?|xml|json)$ {

Keybase proof

I hereby claim:

  • I am luisdalmolin on github.
  • I am luisdalmolin (https://keybase.io/luisdalmolin) on keybase.
  • I have a public key ASCuTQXJVARZnsbRD-QaLiR7OVMB-9c4aHvhsn1HJAPswQo

To claim this, I am signing this object: