This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lines = Array.from(document.querySelectorAll('h1, h2, h3, h4, h5, h6')) | |
.map((heading) => { | |
const number = parseInt((heading.tagName.split('H'))[1], 10); | |
const dashes = number > 0? Array(number).fill('-').join('') : ''; | |
return `${heading.tagName} ${dashes} ${heading.innerHTML}`; | |
}); | |
const result = lines.join('\n'); | |
console.log(result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Pillas el listado de tags (del comentario del commit) | |
2. git push --delete origin tag1 tag2... | |
3. git tags -d tag1 tag2... | |
4. Te pones en el commit a etiquetar | |
5. git tag tag1 && git tag tag2... | |
6. git push --tags |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
extends: ['@open-wc/eslint-config', 'eslint-config-prettier'].map(require.resolve), | |
settings: { | |
'import/resolver': { | |
webpack: { | |
config: { | |
resolve: { | |
modules: ['node_modules'], | |
}, | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Navigate to tweet URL eg: https://twitter.com/onix_negro81/status/1086353323580624897 | |
// Open Chrome developer console | |
// Paste this and hit enter: | |
document.querySelector('.request-favorited-popup').click(); | |
document.querySelectorAll('.not-blocked') | |
.forEach((notBlockedButton) => { | |
notBlockedButton.click(); | |
document.querySelector('.block-button').click(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copy your 22char code from https://www.just-eat.es/paymentoptions/XXXXXXXXXXXXXXXXXXXXXX?SendPreOrderAnalyticsEvent=False | |
const PAYMENT_OPTION = 'XXXXXXXXXXXXXXXXXXXXXX'; | |
const seeds = ['JUSTEAT', 'DESCUENTO', 'LUNES', 'MARTES', 'MIERCOLES', 'JUEVES', 'VIERNES', 'SABADO', 'DOMINGO']; | |
const payload = { "credentials": "include", "headers": { "accept": "*/*", "accept-language": "en,es-ES;q=0.9,es;q=0.8", "cache-control": "no-cache", "pragma": "no-cache", "x-requested-with": "XMLHttpRequest" }, "referrer": `https://www.just-eat.es/paymentoptions/${PAYMENT_OPTION}?SendPreOrderAnalyticsEvent=False`, "referrerPolicy": "no-referrer-when-downgrade", "body": null, "method": "GET", "mode": "cors" }; | |
seeds.forEach(seed => { | |
for (let i = 0; i < 100; i++) { | |
let codes = [`${seed}${i}`, `${i}${seed}`]; | |
codes.map(code => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@-webkit-keyframes shake { | |
0%, | |
to { | |
-webkit-transform: translateZ(0); | |
transform: translateZ(0) | |
} | |
10%, | |
30%, | |
50%, | |
70%, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
_ _ | |
.-/ / ) | |
|/ / / | |
/.' / | |
// .---. | |
/ .--._\ | |
/ `--' / | |
/ .---' | |
/ .' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib | |
import time | |
import sys | |
import os | |
def main(argv): | |
if len(sys.argv) < 5: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Estas 2 líneas dicen que esto es Python y que puede haber caracteres utf-8 como tildes, etc. | |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Importo los módulos que necesito | |
# Para hacer peticiones a urls | |
import urllib | |
# Para esperar intervalos de tiempo | |
import time | |
# Para manipular la entrada/salida por la consola |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Sends a notification to a user | |
* @param $userid Facebooks user id | |
* @param $text Templated text for the notification | |
* @param $href Relative path to append to the canvas URL | |
* @return true if ok, empty string otherwise | |
*/ | |
public function sendNotification ($userid, $text, $href) { |
NewerOlder