Skip to content

Instantly share code, notes, and snippets.

View Fusion's full-sized avatar

Chris F Ravenscroft Fusion

View GitHub Profile
@Fusion
Fusion / workflowy_txt2img.user.js
Created July 4, 2015 08:12
In Workflowy, Ctrl+' turns urls into pictures
// ==UserScript==
// @name workflowy_txt2img.user.js
// @namespace http://voilaweb.com/
// @version 0.1
// @description Simply type a url and it will be converted to an image if it ends with gif/png/jpg
// @author Chris F Ravenscroft
// @homepage http://nexus.zteo.com
// @include http://workflowy.com/*
// @include https://workflowy.com/*
// @include http://*.workflowy.com/*
Verifying that +chrisfr is my blockchain ID. https://onename.com/chrisfr
@Fusion
Fusion / crystal-tags.cr
Last active January 3, 2016 09:07 — forked from datanoise/crystal-tags.cr
ctags for crystal language
require "compiler/crystal/**"
require "option_parser"
include Crystal
class ToCtagsVisitor < Visitor
TAG_NAMES = {
"c" => "class",
"f" => "method",
"s" => "struct",
@Fusion
Fusion / atom-one-package.yml
Last active October 5, 2020 20:00
Ansible playbook to provision your new Atom setup with your favorite plugins (exported using 'apm list -ip') -- run atom-packages.yml
- set_fact: pkgname="{{item}}"
- name: Check whether package '{{item}}' already installed
shell: "apm list -ip | grep '{{item}}@' | wc -l"
register: installed
- name: Install '{{item}}' if necessary
shell: "apm install {{item}}"
when: installed.stdout=="0"

Keybase proof

I hereby claim:

  • I am fusion on github.
  • I am cyansmoker (https://keybase.io/cyansmoker) on keybase.
  • I have a public key ASCVuSE6x24M1u27L-SDDinCqAgZe1f-4nQSeaTJZmeqmQo

To claim this, I am signing this object:

@Fusion
Fusion / crashplan_manage.sh
Created September 19, 2016 01:55
Manage multiple headless CrashPlan servers
#!/bin/bash
function syntax() {
echo "Syntax: $0 localserver1|remoteserver2"
exit 1
}
if [ -z "$1" ]; then
syntax
fi
@Fusion
Fusion / recurse.sh
Created December 18, 2016 00:04
Recurse a shell command across 2 directories
function recurse() {
if [ "$#" -lt 3 ]; then
echo "Syntax: recurse dir1 dir2 commandline...";
else
dir1="$1"
shift
dir2="$1"
shift
find $dir1 -type f -exec $@ {} $dir2/{} \;
fi
@Fusion
Fusion / instructions.md
Last active November 20, 2017 01:56
Exporting from AppShelf to LastPass

AppShelf: Export... > CSV File...

Edit in Excel

Insert a column in second place with this formula:

="LICENSE INFO:" & CHAR(13) & E1 & CHAR(13) & CHAR(13) & A1:J167: " & F1 & " (" & J1 & ")" & CHAR(13) & CHAR(13) & "LICENSEE: " & CHAR(13) & C1 & " (" & D1 & ")" & CHAR(13) & CHAR(13) & "PUBLISHER:" & CHAR(13) & H1 & CHAR(13) & CHAR(13) & "PRICE: " & G1

Copy/Paste Special (Text) in "Software License" template found in https://helpdesk.lastpass.com/wp-content/uploads/Import_format_Secure_Note1.zip

@Fusion
Fusion / install dropbear and sftp in container
Last active April 8, 2018 07:01
Start SSH access for container (helpful to mount container's root volume remotely over sshfs)
bash
if [ -z "$(which dialog)" ]; then sudo apt-get update && sudo apt-get install -y dialog; fi \
&& dialog --menu 'Pick container to instrument' 20 79 20 $(docker ps --format '{{.ID}} {{.Names}}') 2>/tmp/dialog.pick \
&& C="$(cat /tmp/dialog.pick)" \
&& if [ -z "$C" ]; then exit 0; fi \
&& if [ -z "$(docker exec -t ${C} find /etc -name alpine-release)" ]; then
CU='apt-get'; CI='apt-get install -y'; else CU='apk'; CI='apk add'; fi \
&& if [ -z "$(docker exec -t ${C} which dropbear)" ]; then docker exec -t ${C} sh -c "${CU} update && ${CI} dropbear openssh-sftp-server && mkdir /etc/dropbear && dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key"; fi \
&& docker exec -it ${C} passwd
@Fusion
Fusion / README.md
Last active April 16, 2019 01:14
Use a SSH key stored, encrypted, on a USB stick

What does this do for me?

You will be able to keep your public/private key pairs on a USB stick with a reasonable level of security.

Using this script, you will create a local ssh keystore, use it to decrypt your key, and delete it when you are done.

Platforms?

  • OS X, Linux: fully supported
  • Windows: some manual intervention required