- The Silver Searcher (
ag
): Fast code searching pgcli
: Better Postgres CLI (syntax highlighting + auto-completion)
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
import crypto from "crypto"; | |
const separator = ":"; | |
export function sign(content, secret) { | |
const signature = generateSignature(content, secret); | |
return { | |
signature, | |
content, | |
signedContent: join(content, signature) |
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
export class FirestoreBatcher { | |
batches = []; | |
index = 0; | |
constructor(firestore) { | |
this.firestore = firestore; | |
} | |
getNext() { | |
if (this.index++ % 500 === 0) { |
Better react-hotkeys HOC
Usage:
withHotKeys({ new: "alt+n" }, { new: props => event => console.log(props, event) })(...)
Useful to use with recompose.
I hereby claim:
- I am cretezy on github.
- I am cretezy (https://keybase.io/cretezy) on keybase.
- I have a public key ASAyf6-mYb28_SnKYGRlnTBdDFIMpI4hgGlFXV21WC93Rgo
To claim this, I am signing this object:
Simply add this snippet...
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
...to .bashrc
or .zshrc
or any file ran on login.
Simple script to stream a file from Node.js to Icecast (or any libshout
compatible server) using nodeshout.
const shout = ... // Shout instance
const songPath = 'song.ogg';
const playing = play(shout, songPath);
playing.on("finish", ()=>{
// Do something (e.g.: play next song)
});
Mostly made for Debian/Ubuntu. Might work with other distributions/setup, be careful.
Make Spotify DPI factor of 2.1 (override)
cp /usr/share/applications/spotify.desktop ~/.local/share/applications/
sed -i 's/Exec=spotify %U/Exec=spotify --force-device-scale-factor=2.1 %U/g' ~/.local/share/applications/spotify.desktop
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
using UnityEngine; | |
using System.Collections; | |
public class Mazer : MonoBehaviour | |
{ | |
ArrayList walls = new ArrayList (); | |
ArrayList cells = new ArrayList (); | |
void MazeIt () | |
{ |
NewerOlder