Skip to content

Instantly share code, notes, and snippets.

View wwalker's full-sized avatar

Wayne Walker wwalker

View GitHub Profile
@keikoro
keikoro / FF_HTMLbookmarks_toCSV.js
Last active April 13, 2024 23:36
JavaScript bookmarklet for converting HTML-formatted Firefox bookmarks into a downloadable CSV file
javascript:(function(){
/* escape quotes and commas in contents to be comma-separated */
function wrapCsvContents(content) {
if (typeof(content) === 'string') {
if (content.replace(/ /g, '').match(/[\s,"]/)) {
return '"' + content.replace(/"/g, '""') + '"';
}
}
return content;
}
@marceloalmeida
marceloalmeida / .gitattributes
Last active December 7, 2023 14:26
How to show diffs for gpg-encrypted files?
*.gpg filter=gpg diff=gpg
*.asc filter=gpg diff=gpg
@DarinM223
DarinM223 / Installing.md
Created January 27, 2018 13:29
Installing GHC Mod

Installing GHC Mod

  1. Go to ~/.stack/global-project/stack.yaml and change the resolver: section to lts-10.3.

  2. Add:

- https://hackage.haskell.org/package/ghc-mod-5.9.0.0/candidate/ghc-mod-5.9.0.0.tar.gz
- cabal-helper-0.8.0.0
@mattbell87
mattbell87 / Steam-on-fedora.md
Last active April 13, 2024 00:36
How to install Steam on Fedora

Installing Steam on Fedora

These instructions are currently for Fedora 30. I'll update them over the releases if anything changes.

Open Software

Press the Win/Super key, type software and press Enter.

Enable the Third party and Steam repositories

@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active May 4, 2024 15:04
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@ericchiang
ericchiang / flock.go
Last active September 19, 2023 20:26
Golang Flock
package main
// #include <sys/file.h>
import "C"
import (
"fmt"
"os"
"os/exec"
)
@eugeneius
eugeneius / xmarks2git.py
Last active February 2, 2018 00:52
Downloads every revision of your Xmarks bookmarks and saves them in a git repository.
#!/usr/bin/env python
import argparse
import getpass
import json
import re
import requests
import subprocess
parser = argparse.ArgumentParser()
@jottr
jottr / i3-get-window-criteria
Last active September 26, 2023 00:05
Get window criteria to use with i3 window placement. Taken from: http://bit.ly/1e9pcfe
#!/bin/sh
# i3-get-window-criteria - Get criteria for use with i3 config commands
# To use, run this script, then click on a window.
# Output is in the format: [<name>=<value> <name>=<value> ...]
# Known problem: when WM_NAME is used as fallback for the 'title="<string>"' criterion,
# quotes in "<string>" are not escaped properly. This is a problem with the output of `xprop`,
# reported upstream: https://bugs.freedesktop.org/show_bug.cgi?id=66807
@dmitshur
dmitshur / gist:6927554
Last active September 17, 2023 07:35
[Legacy GOPATH mode] How to `go get` private repos using SSH key auth instead of password auth.

WARNING: This gist was created in 2013 and targets the legacy GOPATH mode. If you're reading this in 2021 or later, you're likely better served by reading https://tip.golang.org/cmd/go/#hdr-Configuration_for_downloading_non_public_code and https://golang.org/ref/mod#private-modules.

$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
@taylor
taylor / basename_dereference_sourced.sh
Created December 14, 2012 21:07
Find the name of the shell script, de-reference symlinks, handle both SOURCED scripts and executed versions.
#!/bin/bash
[[ "$0" = "-bash" ]] && N="$BASH_SOURCE" || N="$0"
me=$(basename `readlink --canonicalize --no-newline $N`)