This file contains 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
/** | |
* Colours taken from Dieter Rams legendary production collection for Braun. Made by Chad Ashley. | |
* Source: http://blog.presentandcorrect.com/rams-palettes | |
* Demo: https://xaviesteve.com/pro/colorpalettes/ | |
* Try it: https://xaviesteve.com/pro/sass-palette/ | |
* Compiled by Xavi Esteve | |
*/ | |
// DR06 |
This file contains 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
/** | |
* Magic Copy | |
* This little script will append some text to the clipboard when a user copies text from the website | |
* | |
* WARNING: This feature is an anti-pattern and a bad usability practice in 99% of cases, use only in | |
* those situations where it can really benefit the user to have a link to the full resource | |
*/ | |
document.addEventListener('copy', (event) => { | |
if (document.getSelection().toString().length < 10){ return; } | |
const pagelink = `\n${document.location.href}`; |
This file contains 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
# espanso match file | |
# For a complete introduction, visit the official docs at: https://espanso.org/docs/ | |
# You can use this file to define the base matches (aka snippets) | |
# that will be available in every application when using espanso. | |
# Matches are substitution rules: when you type the "trigger" string | |
# it gets replaced by the "replace" string. | |
matches: |
This file contains 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
var shows = {"shows":["12 Monkeys","19-2 (2014)","2 Broke Girls","24","60 Minutes Australia","60 Minutes US","8 Out of 10 Cats","A D The Bible Continues","A to Z","A Young Doctor's Notebook","About a Boy","Adventure Time","Air Crash Investigation - Mayday","Alaska: The Last Frontier","Alaskan Bush People","Ali G: Rezurection","Allegiance","Almost Human","Almost Royal","Alpha House","Ambassadors","America Declassified","America Unearthed","America's Got Talent","America's Next Top Model","American Crime","American Dad!","American Horror Story","American Idol","American Ninja Warrior","American Odyssey","American Pickers","American Restoration","Ancient Aliens","Anger Management","Another Period","Anthony Bourdain: Parts Unknown","Antiques Roadshow UK","Aqua TV Show Show","Aquarius (US)","Archer (2009)","Arctic Air","Arrow","At Midnight","Atlantis","Attack on Titan","Avengers Assemble (2013)","Awkward.","Axe Cop","Baby Daddy","Babylon","Bachelor in Paradise","Back in the Game","Backstrom","Bad Education","Bad I |
This file contains 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 | |
/** | |
ABUSE CHECK | |
Throttle client requests to avoid DoS attack | |
*/ | |
session_start(); | |
$usage = array(5,5,5,5,10,20,30,40,50,60,120,180,240); // seconds to wait after each request | |
if (isset($_SESSION['use_last'])) { | |
$nextin = $_SESSION['use_last']+$usage[$_SESSION['use_count']]; |
This file contains 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
javascript: | |
/*! ReadingMode © Xavi Esteve */ | |
(function (d) { | |
var el = d.getElementsByTagName("*"); | |
var htmlDiv = d.createElement("div"); | |
var readingModeMenu = d.createElement("div"); | |
var readingModeAlert = d.createElement("div"); | |
var title = d.title; | |
var rmSettings = {}; |
This file contains 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
.flex-grid { | |
display: flex; | |
} | |
.col { | |
flex: 1; | |
} | |
/* Break on mobile? */ | |
@media (max-width: 400px) { | |
.flex-grid { |
This file contains 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
/** | |
* HackerNews better readability | |
* Use any Browser extension that lets you add CSS code. | |
* © XaviEsteve.com | |
* https://gist.github.com/luckyshot/af6687f8ac3b0dc458818753dccbd412/ | |
* Last updated: 18 Dec 22 | |
*/ | |
/* Home */ | |
html, body { |
This file contains 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
/** | |
clearInterval(t);var t = setInterval(function(){run()}, 100); | |
*/ | |
var run = function(){ | |
// Make paperclip | |
// Clicks the 'Make paperclip' button, useful at the very beginning of the game | |
var wire = parseInt(document.querySelector('#wire').innerText); | |
if (wire > 0){ | |
for (let index = 0; index < 100; index++) { |
This file contains 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
<html> | |
<body> | |
<input type="text" id="projects-search" placeholder="Search projects…"> | |
<script> | |
var filterProjects = function( query ){ | |
var list = document.querySelectorAll('#projects-table tbody tr'), | |
query = query.toLowerCase(); | |
for (let i = 0; i < list.length; i++) { | |
if ( query.length > 0 && list[i].innerText.toLowerCase().indexOf( query ) === -1 ){ |
NewerOlder