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 July 11, 2024 20:15
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 July 20, 2024 10:16
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 July 18, 2024 07:33
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 July 14, 2024 16:13
[Legacy GOPATH mode] How to `go get` private repos using SSH key auth instead of password auth.
@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`)