Skip to content

Instantly share code, notes, and snippets.

@larsxschneider
larsxschneider / enc4hub.sh
Created June 3, 2020 06:31
Encrypt a file to send it securely to another Hubber
#!/usr/bin/env bash
# Encrypt a file to send it securely to another Hubber
#
# Use https://gpgtools.org/ to an easy to use decryption UI.
#
# Usage:
# enc4hub larsxschneider /path/to/file
#
set -e
recipient=$1
@lfender6445
lfender6445 / gist:9919357
Last active November 18, 2024 20:32
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

// Code
Function.prototype.curry = function() {
var func = this, a = Array.prototype.slice.call(arguments, 0);
return function() {
var a_len = a.length, length = arguments.length;
while (length--) a[a_len + length] = arguments[length];
return func.apply(this, a);
}
};
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",