Skip to content

Instantly share code, notes, and snippets.

View pugson's full-sized avatar

pugson pugson

View GitHub Profile
@pugson
pugson / registerServiceWorker.js
Created August 6, 2019 11:40
ServiceWorker update banner & cache
import { toast } from 'react-toastify';
// 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.
@pugson
pugson / gcd.sh
Created July 3, 2019 21:20
Git clone and cd into the directory after
gcd() {
git clone "$1" && cd "$(basename "$1" .git)"
}
@pugson
pugson / _redirects
Created May 8, 2019 13:18
Netlify domain redirect
/ https://www.notion.so/wojtek/Awesome-Links-Stash-00df272564534a9c8b6f15c0f3a52d61
@pugson
pugson / readme.md
Created April 4, 2019 15:11
How to fix unknown host on .dev TLD after using puma-dev

How to fix unknown host on .dev TLD after using puma-dev

  1. Run scutil --dns
  2. Check if you have something like this in your output:
resolver #8
  domain   : dev
  nameserver[0] : 127.0.0.1
  port     : 9253
 flags : Request A records, Request AAAA records
@pugson
pugson / style.css
Created March 7, 2019 23:22
Break element out of a container
.element {
width: 100vw;
position: relative;
left: calc(-1 * (100vw - 100%) / 2);
}
@pugson
pugson / WIP GIFs.json
Created August 12, 2018 16:02
Handbrake high-quality MP4 muted videos
{
"PresetList" : [
{
"AlignAVStart" : false,
"AudioCopyMask" : [
],
"AudioEncoderFallback" : "ca_aac",
"AudioLanguageList" : [
@pugson
pugson / easing.css
Created August 2, 2018 16:05 — forked from bendc/easing.css
Easing CSS variables
:root {
--ease-in-quad: cubic-bezier(.55, .085, .68, .53);
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19);
--ease-in-quart: cubic-bezier(.895, .03, .685, .22);
--ease-in-quint: cubic-bezier(.755, .05, .855, .06);
--ease-in-expo: cubic-bezier(.95, .05, .795, .035);
--ease-in-circ: cubic-bezier(.6, .04, .98, .335);
--ease-out-quad: cubic-bezier(.25, .46, .45, .94);
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);

Keybase proof

I hereby claim:

  • I am pugson on github.
  • I am wkw (https://keybase.io/wkw) on keybase.
  • I have a public key whose fingerprint is 9CA7 07A1 BAC0 8F37 8810 E4E5 82C4 5CFD 085A DFBB

To claim this, I am signing this object:

@pugson
pugson / svgo.json
Created September 7, 2016 23:53
Compact settings for Sketch's SVGO Compressor Plugin
{
"comment": "This is the settings file for the SVGO Compressor Plugin. For more info, please check <https://github.com/BohemianCoding/svgo-compressor>",
"pretty": false,
"indent": 0,
"plugins": [
{
"name": "cleanupAttrs"
},
{
"name": "cleanupEnableBackground"
@pugson
pugson / run_scripts.sh
Created August 11, 2016 22:28
Send Telegram Bot Notification when a torrent finishes downloading in Transmission
#!/bin/sh
# Replace chat_id value with your chat id from @myidbot
# Replace XXXXXXXXX:xxxxxxxxxxxxxxxxxxxxx with your bot token from @BotFather
curl --data chat_id=XXXXXXXXX --data-urlencode text=�~\~E\ $TR_TORRENT_NAME "https://api.telegram.org/botXXXXXXXXX:xxxxxxxxxxxxxxxxxxxxx/sendMessage"