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
<?php | |
// You need to use the FetLife.php library available at GitHub, here: | |
// https://github.com/meitar/libFetLife/blob/fbf4123eb1682369d8a4ad86011b87e3717297af/FetLife.php | |
require_once 'libFetLife/FetLife.php'; | |
if (!defined('STDIN') || !defined('STDERR')) { die('Please run this from the command line.'); } | |
// Obviously(?) replace the USERNAME with a username that can log in to FetLife, and the PASSWORD with that user's password. | |
$FL = new FetLifeUser('USERNAME', 'PASSWORD'); | |
// Uncomment this next line to use a local SOCKS proxy, like Tor. | |
//$FL->connection->setProxy('localhost:9050', CURLPROXY_SOCKS5); |
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
#!/bin/bash | |
function remove_dir () { | |
rm -rf "$1_" | |
if [ -d "$1" ] | |
then | |
mv "$1" "$1_" | |
fi | |
} |
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
#!/usr/bin/env python | |
# | |
# Convert a set of similarly-structured .xlsx files into a SQLite DB. | |
# | |
# For example, say you have hundreds of Excel files in a directory | |
# called "big-analysis-project" and that each of these Excel files | |
# has a worksheet containing the same set of columns. Rather than | |
# having hundreds of separate Excel files, it would be handy to have | |
# all their data inside one relational database management system. | |
# |
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
#!/bin/bash - | |
# | |
# File: cg-make-snapshot.sh | |
# | |
# Description: A utility script that takes a static snapshot of any | |
# Crabgrass group that you have access to. | |
# | |
# Examples: Use cg-make-snapshot.sh to create a mirror containing | |
# the contents of a Crabgrass group. | |
# |
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
<?php | |
/** | |
* Adds HTTP protocol support to the server. | |
* | |
* @package RecurseCenter\Interivew\SocketServer | |
*/ | |
require_once dirname(__FILE__) . '/interface-rcinterview-reader.php'; | |
/** | |
* HTTP protocol reader. |
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
#!/bin/bash - | |
# | |
# Bash script to separate a single vCard containing multiple contacts | |
# into multiple vCard files each with its own contact. | |
# | |
# Usage: | |
# | |
# ./contact-split.sh < INPUT_FILE.vcf | |
# | |
# where INPUT_FILE.vcf is, of course, the monolithic vCard file. |
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
#!/bin/bash -x | |
# | |
# Switch out one Signal Desktop installation for another. | |
# | |
APPSUPPORT_DISABLED="$HOME/tmp/Library-DISABLED/Application Support" | |
mkdir -p "$APPSUPPORT_DISABLED" |
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
#!/bin/bash - | |
# | |
# Given a playlist, expected in M3U format, copies | |
# the songs listed in said playlist to the given | |
# output directory, creating a new playlist using | |
# relative path names. This new folder can then be | |
# shared more easily. | |
playlist="$1" # Path to an M3U file. | |
tmpfile="$(mktemp playlist.XXXXX)" |