Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Luís Dalmolin luisdalmolin

🏠
Working from home
Block or report user

Report or block luisdalmolin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybindings.json
[
{
"key": "ctrl+cmd+p",
"command": "workbench.action.openRecent"
}
]
View keybase.md

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:

View file-upload.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss/dist/tailwind.min.css" rel="stylesheet">
</head>
<body>
@luisdalmolin
luisdalmolin / nginx.conf
Created Mar 28, 2017
Nginx cache config
View nginx.conf
# 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)$ {
View pagseguro.js
PagSeguroDirectPayment.getBrand({
cardBin: $scope.card,
success: function(response) {
console.log(response);
},
error: function(response) {
console.log(response);
}
@luisdalmolin
luisdalmolin / worker.js
Last active Aug 30, 2016
Service Worker to make the site offline
View worker.js
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();
});
View gist:e09e711b1bc1b266d5dc
Verifying that +luisdalmolin is my blockchain ID. https://onename.com/luisdalmolin
@luisdalmolin
luisdalmolin / ufs.html
Created Jan 8, 2015
Select com estados brasileiros
View ufs.html
<select name="uf" id="uf" class="input input-uf" required>
<option value="">UF</option>
<option value="AC" {{ Input::old('city') == 'AC' ? 'selected="selected"' : null }}>AC</option>
<option value="AL" {{ Input::old('city') == 'AL' ? 'selected="selected"' : null }}>AL</option>
<option value="AP" {{ Input::old('city') == 'AP' ? 'selected="selected"' : null }}>AP</option>
<option value="AM" {{ Input::old('city') == 'AM' ? 'selected="selected"' : null }}>AM</option>
<option value="BA" {{ Input::old('city') == 'BA' ? 'selected="selected"' : null }}>BA</option>
<option value="CE" {{ Input::old('city') == 'CE' ? 'selected="selected"' : null }}>CE</option>
<option value="DF" {{ Input::old('city') == 'DF' ? 'selected="selected"' : null }}>DF</option>
<option value="ES" {{ Input::old('city') == 'ES' ? 'selected="selected"' : null }}>ES</option>
@luisdalmolin
luisdalmolin / Gruntfile.js
Created Nov 19, 2014
Exemplo de utilização do Grunt
View Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
uglify: {
options: {
mangle: false
},
app: {
files: {
'public/assets/javascripts/js/main.min.js': [ // arquivo minificado
@luisdalmolin
luisdalmolin / adwords.js
Created May 5, 2014
Adwords Conversion
View adwords.js
function adwords_conversion(google_conversion_id, google_value, google_conversion_label) {
var img = new Image();
img.src = 'https://www.googleadservices.com/pagead/conversion/' + google_conversion_id + '/?value='+google_value+'&amp;label='+google_conversion_label+'&amp;script=0';
img.height = 1;
img.width = 2;
document.body.appendChild(img);
}
You can’t perform that action at this time.