Skip to content

Instantly share code, notes, and snippets.

@joelpt
joelpt / go-to-anything.ahk
Created April 16, 2012 18:51
Go To Anything for Autohotkey - highlight some text, hit Win+G and "go"!
;; Go to anything that is in the currently selected text: URLs, email addresses, Windows paths, or just "Google it"
;; Forum topic: http://www.autohotkey.com/community/viewtopic.php?f=2&t=85152&p=537116
$#G::
;Tip("Clipping...") ;; include my mouse-tip library for this https://gist.github.com/2400547
clip := CopyToClipboard()
if (!clip) {
return
}
addr := ExtractAddress(clip)
if (!addr)
@hemstreet
hemstreet / culture_to_currency.json
Last active October 25, 2022 18:38 — forked from malog84/culture_to_currency.json
Mapping of culture code to three-character ISO 4217 currency symbol
[{"af-ZA":"ZAR"},
{"af-ZA":"ZAR"},
{"am-ET":"ETB"},
{"ar-AE":"AED"},
{"ar-BH":"BHD"},
{"ar-DZ":"DZD"},
{"ar-EG":"EGP"},
{"ar-IQ":"IQD"},
{"ar-JO":"JOD"},
{"ar-KW":"KWD"},
@hsleonis
hsleonis / better-font-smoothing.css
Last active January 12, 2025 12:26
Better font smoothing in cross browser
html {
/* Adjust font size */
font-size: 100%;
-webkit-text-size-adjust: 100%;
/* Font varient */
font-variant-ligatures: none;
-webkit-font-variant-ligatures: none;
/* Smoothing */
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
@zcaceres
zcaceres / Nested-Routers-Express.md
Last active April 6, 2025 20:09
Child Routers in Express

Nested Routers in Express.js

Express makes it easy to nest routes in your routers. But I always had trouble accessing the request object's .params when you had a long URI with multiple parameters and nested routes.

Let's say you're building routes for a website www.music.com. Music is organized into albums with multiple tracks. Users can click to see a track list. Then they can select a single track and see a sub-page about that specific track.

At our application level, we could first have a Router to handle any requests to our albums.

const express = require('express');
// In production, we register a service worker to serve assets from local cache.
// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on the "N+1" visit to a page, since previously
// cached resources are updated in the background.
// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
// This link also includes instructions on opting out of this behavior.
@anderjs
anderjs / config-override.js
Last active May 31, 2023 03:38
Cache Busting CRA with react-app-rewired
const path = require('path')
const { merge } = require('webpack-merge')
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
module.exports = function (config) {
return merge(config, {
plugins: [
new CleanWebpackPlugin(),
],