Skip to content

Instantly share code, notes, and snippets.

View paulmsmith's full-sized avatar

Paul Smith paulmsmith

View GitHub Profile
@EllyLoel
EllyLoel / reset.css
Last active April 13, 2024 18:14
CSS Reset
/*
Made by Elly Loel - https://ellyloel.com/
With inspiration from:
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
- Adam Argyle - https://unpkg.com/open-props@1.3.16/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
Notes:
- `:where()` is used to lower specificity for easy overriding.
*/
@edwardhorsford
edwardhorsford / filters.js
Last active October 28, 2022 13:55
Useful Nunjucks filters for the GOV.UK Prototype Kit
/*
=====================================================================
arrayToGovukTable
Convert an array to form needed for govukTable macro
=====================================================================
Expects array or nested array.
Usage:
@francisco-perez-sorrosal
francisco-perez-sorrosal / Makefile.rsync
Created January 18, 2019 19:45
Makefile for Rsync
# Local-Remote synchronization of directories/files
# NOTE: Deletions are NOT considered yet.
# Usage
# -----
# Local-remote sync:
# make -f Makefile.rsync lrsync SERVER=my_host PROJECT=project_name LOCAL_BASEDIR=/Users/my_name/dev REMOTE_BASEDIR=/home/my_name/dev
#
# Remote-local sync:
# make -f Makefile.rsync rlsync SERVER=my_host PROJECT=project_name LOCAL_BASEDIR=/Users/my_name/dev REMOTE_BASEDIR=/home/my_name/dev
@james-nash
james-nash / contrast-grid-url.js
Last active December 23, 2022 07:55
Generates EightShapes Contrast Grid or Christopher Geary's "Contrast" tool URLs from InVision DSM or Brand.ai design tokens.
/*
Generates EightShapes Contrast Grid or Christopher Geary's "Contrast" tool
URLs from InVision DSM or Brand.ai.
Usage for Contrast Grid URL:
node contrast-grid-url.js [URL]
Usage for Contrast URL:
@mitcho
mitcho / makeabstracts.py
Created November 19, 2016 06:26
makeabstracts.py
#!/usr/local/bin/python3
# Michael Yoshitaka Erlewine 2016, public domain
# instructions:
# brew install enscript
# Install PDFtk
# current build: https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg
#
# setup csv with EasyChair ID, desired filename, authors

From zero to microservice with 𝚫 now

The following guide will show you how to deploy a simple microservice written in JavaScript using 𝚫 now.

It uses Open Source tools that are widely available, tested and understood:

  • Node.JS
  • NPM
  • Express
@lopspower
lopspower / README.md
Last active May 3, 2024 13:26
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@s10wen
s10wen / gist:73afbfa5971ba966307a
Last active August 24, 2016 08:25
UpFrontConf 2015 - Slides
Brad Frost:
TBC
Alicia Sedlock:
https://speakerdeck.com/aliciasedlock/jumping-into-front-end-testing
Richard Rutter:
http://webtypography.net/talks/upfront2015/
Soledad Penadés:
@tedmiston
tedmiston / archive-all-facebook-messages.js
Last active April 8, 2024 07:36
Archive all of the messages in your Facebook Messages Inbox
function archive_all(testOnly) {
var someMessages, archiveButton;
if (testOnly === "undefined") { testOnly = false; }
someMessages = $("li._k- span.accessible_elem");
console.log("Found", someMessages.length, "messages to archive in your inbox.");
archiveButton = null;
someMessages.each(function () {
@oroce
oroce / app.js
Last active June 16, 2021 21:05
Redirect express while keeping params
/*
URLs:
http://localhost:3000/arrive?foo=bar&utm_source=smart-redir
*/
var redirect = require('redirect-with-params');
var express = require('express');
var app = express();
app.use(redirect({