Skip to content

Instantly share code, notes, and snippets.

Getting pucks deep

Steven Black StevenBlack

Getting pucks deep
Block or report user

Report or block StevenBlack

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
slorber / react-navigation-tree.jsx
Last active Feb 13, 2020
View react-navigation-tree.jsx
const App = createAppContainer(
LoggedSwitch: createSwitch({
// When user is authenticated
LoggedIn: createStack({
// The logged in root is generally a tab or drawer navigator
LoggedInRoot: createTabsOrDrawer({
shcallaway /
Created Feb 22, 2019
Bookmarklet for getting past digital publication paywalls

When creating a new browser bookmark, paste the following code snippet into the "Location" field:


Now visit an article that has a paywall, and click your bookmarklet!

cezaraugusto / gpg_fix.txt
Last active Feb 11, 2020
fixing `gpg failed to sign data` error on macOS
View gpg_fix.txt
For troubleshooting, two things to first try:
run `git config --global gpg.program gpg2`, to make sure git uses gpg2 and not gpg
run `echo "test" | gpg2 --clearsign`, to make sure gpg2 itself is working
If that all looks all right, one next thing to try:
run `brew install pinentry` to ensure you have a good tool installed for passphrase entry
If after that install and you re-try git commit and still get the "failed to sign the data" error:
run `gpgconf --kill gpg-agent` to kill any running agent that might be hung
View forgetme.js
class Parent extends React.Component {
constructor(...args) {
this.state = {
renderChild: true
this.interval = null;
ljharb /
Last active Feb 17, 2020
Array iteration methods summarized

While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.


JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it much simpler to think about both the old list and the new one, what they contain, and

View blacklist
# Clickbait news sources
View Update-HostsFile.ps1
Tested on Win7-64x and Powershell v5 & v4
maybe Set-ExecutionPolicy Unrestricted
msenturk - 24.02.2016
# Create temp folder..
New-Item -ItemType Directory -Force -Path 'C:\Hosts\'
Set-Location C:\Hosts\
wget '' -OutFile hosts
View postgres

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.


installation, Ubuntu

PurpleBooth /
Last active Feb 17, 2020
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


jirutka /
Last active Jan 16, 2020
Some convenient scripts to manage ownerships and privileges in PostgreSQL.
# The MIT License
# Copyright 2014-2017 Jakub Jirutka <>.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
You can’t perform that action at this time.