Skip to content

Instantly share code, notes, and snippets.

Avatar

Luís Dalmolin luisdalmolin

View GitHub Profile
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 / regexp-name-id.md
Created Nov 6, 2012
Remove name and ID attribute
View regexp-name-id.md

Removendo todos os atributos name e ID

  • \s*(name|id)="[^"]+"\s*
  • # (1 espaço)

Adicionando style="display: block"

  • \s*(border)="[^"]+"\s*
  • border="0" style="display: block"
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:

@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 / gradient.scss
Created Jun 5, 2013
Compass Gradient CSS3 function
View gradient.scss
@mixin gradient($color-start, $color-stop, $direction: top) {
background-color: $color-stop;
@include background-image(linear-gradient($direction, $color-start, $color-stop));
}
You can’t perform that action at this time.