Skip to content

Instantly share code, notes, and snippets.

Meitar M. meitar

Block or report user

Report or block meitar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@meitar
meitar / contact-split.sh
Created Oct 31, 2017
Bash script to separate a single vCard containing multiple contacts into multiple vCard files each with its own contact.
View contact-split.sh
#!/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.
@meitar
meitar / class-http-reader.php
Created Jun 27, 2016
Recurse Center pairing interview code sample for Meitar Moscovitz. Use `php server.php` to start the server, then access http://localhost:4000/set?somekey=someval as per RC pairing interview instructions.
View class-http-reader.php
<?php
/**
* Adds HTTP protocol support to the server.
*
* @package RecurseCenter\Interivew\SocketServer
*/
require_once dirname(__FILE__) . '/interface-rcinterview-reader.php';
/**
* HTTP protocol reader.
@meitar
meitar / cg-make-snapshot.sh
Last active Feb 2, 2016
Create a static snapshot (HTML mirror) of a Crabgrass group. THIS GIST IS STALE. PLEASE REFER TO https://github.com/meitar/crabgrass-tools for updated information.
View cg-make-snapshot.sh
#!/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.
#
@meitar
meitar / xl2sqlite.py
Created Nov 5, 2015
Convert a set of similarly-structured .xlsx files into a SQLite DB (using openpyxl and sqlite3).
View xl2sqlite.py
#!/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.
#
@meitar
meitar / uninstall-GHfM.sh
Last active Aug 29, 2015 — forked from lukehefson/uninstall-GHfM.sh
Uninstall GitHub for Mac, updated for December 2014
View uninstall-GHfM.sh
#!/bin/bash
function remove_dir () {
rm -rf "$1_"
if [ -d "$1" ]
then
mv "$1" "$1_"
fi
}
@meitar
meitar / faade-find-paying-users.php
Created May 6, 2013
Cross-reference data in the FetLife Alleged Abusers Database Engine against the the live FetLife site to determine which users accused of violating consent are also paying supporters of FetLife.com. (Output is provided on STDOUT as CSV data, ready for importing to a data analysis tool, such as a spreadsheet. Script progress is reported on STDERR…
View faade-find-paying-users.php
<?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);
You can’t perform that action at this time.