Skip to content

Instantly share code, notes, and snippets.

// Core assets
let coreAssets = [];
// On install, cache core assets
self.addEventListener('install', function (event) {
// Cache core assets
event.waitUntil(caches.open(coreID).then(function (cache) {
for (let asset of coreAssets) {
cache.add(new Request(asset));
@quelicm
quelicm / Remove all git tags
Last active June 19, 2019 13:17 — forked from okunishinishi/Remove all git tags
Delete all git remote tags #git #tags
# Based on: https://gist.github.com/mobilemind/7883996
# List all tags
git tag
# Search tags
git tag -l tag-pattern-to-search
# delete local tag '12345'
git tag -d 12345
@quelicm
quelicm / native-promise-deferred.js
Created October 15, 2017 17:28 — forked from flaki/native-promise-deferred.js
Deferred objects tooling based on the native ES6 Promise implementation
/*
* Extends native promises with deferred objects.
* Deferreds return an object that has a <promise>, which could be resolved via
* the included <resolve> and <reject> calls.
*/
if (Promise && !("deferred" in Promise)) Promise.deferred = function() {
var fResolve,
fReject,
P = new Promise(function(resolve, reject) {
fResolve = resolve;
@quelicm
quelicm / multiple_ssh_setting.md
Last active June 16, 2019 08:18 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github #git

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@quelicm
quelicm / gist:35a75adcb1549b4c10d0
Last active June 16, 2019 08:18
Custom Social Sharing Buttons #html
# Custom Social Sharing Buttons
Custom social sharing buttons for Twitter, Facebook, Google Plus, LinkedIn, StumbleUpon, and Pinterest.
TODO: ADD MORE http://petragregorova.com/articles/social-share-buttons-with-custom-icons/
```html
<a class="icon-twitter" rel="nofollow"
href="http://twitter.com/"
onclick="popUp=window.open(
@quelicm
quelicm / gist:6047586
Last active December 20, 2015 01:18
Configuraciones Mac OS X
#mostrar la ruta en el título de la ventana del finder.
//activarlo
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
//desactivarlo
defaults write com.apple.finder _FXShowPosixPathInTitle -bool NO
#configurar menu contextual para copiar la ruta
1) Abrimos automator y seleccionamos servicios
2) Arriba en la parte derecha marcamos en "El servicio recibe la seleccion de" la opción "archivos o carpetas" y en "finder"
@quelicm
quelicm / rem-calibrate.css
Last active June 16, 2019 08:19 — forked from brianblakely/rem-calibrate.css
Allow to android config font-size inferior 8px #css
/* Android stock browser won't let you set font-size smaller than 8px unless you apply this. */
:root {
-webkit-text-size-adjust: none;
-moz-text-size-adjust: none;
-ms-text-size-adjust: none;
-o-text-size-adjust: none;
text-size-adjust: none;
}
@quelicm
quelicm / hosting, server, symfony2, dinahosting
Last active June 16, 2019 08:21
Configurando proyecto symfony2 en una subcarpeta del hosting #symfony
# En symfony2 por defecto debemos configurar el document_root del dominio para que responda el directorio "web", el problema viene cuando no podemos cambiar donde apunta por defecto el dominio (no tenemos acceso a la configuración del apache), esta solución no es ideal pero funciona.
#1 Nuestro dominio apunta a una carpeta raiz en el servidor web, suelen ser generalmente httpdocs, public_html, www pero podrían ser cualquier otra, en esta carpeta raiz subimos todo el contenido de symfony2
#2 En la carpeta raiz nos creamos un fichero .htaccess, similar al que tenemos dentro de la carpeta web con la siguiente configuración:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /symfony/web/app.php [QSA,L]
@quelicm
quelicm / dabblet.css
Last active June 16, 2019 08:21
play a bit with nth-child and nth-last-child #css #selectors #nth-child
/**
* play a bit with nth-child and nth-last-child
*/
div {
width: 40px;
height: 40px;
margin: 2px;
border: solid 2px #444
}
@quelicm
quelicm / dabblet.css
Last active June 16, 2019 08:22 — forked from LeaVerou/dabblet.css
Image interpolation demo #css
/* Image interpolation demo
WebKit-only at the time (April 2012)
*/
@keyframes browsers {
20% { background-image: url('http://lea.verou.me/css-4d/img/chrome-logo.png'); }
40% { background-image: url('http://lea.verou.me/css-4d/img/safari-logo.png'); }
60% { background-image: url('http://lea.verou.me/css-4d/img/opera-logo.png'); }
80% { background-image: url('http://lea.verou.me/css-4d/img/ie-logo.png'); }
}