Skip to content

Instantly share code, notes, and snippets.

View joesondow's full-sized avatar

Joe Sondow joesondow

View GitHub Profile
@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@veryphatic
veryphatic / markov.java
Created July 27, 2012 23:11
Simple Markov chain text generator
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Hashtable;
import java.util.Random;
import java.util.Vector;
public class Markov {
@freman
freman / blacklist.scpt
Created December 16, 2015 07:02
Spotify blacklist script.
repeat
if application "Spotify" is running then
tell application "Spotify"
set seenTrack to ""
repeat while player state is playing
if player state is playing then
set theAlbum to album of the current track
set theTrack to name of the current track
set theArtist to artist of the current track
set trackLength to duration of current track
@edsu
edsu / replies.py
Last active December 7, 2022 18:59
Try to get replies to a particular set of tweets, recursively.
#!/usr/bin/env python
"""
Twitter's API doesn't allow you to get replies to a particular tweet. Strange
but true. But you can use Twitter's Search API to search for tweets that are
directed at a particular user, and then search through the results to see if
any are replies to a given tweet. You probably are also interested in the
replies to any replies as well, so the process is recursive. The big caveat
here is that the search API only returns results for the last 7 days. So
@joesondow
joesondow / happy_git_on_osx.md
Last active November 21, 2016 10:10 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

/*
A copy of https://gist.github.com/airhadoken/8742d16a2a190a3505a2
See also: https://botwiki.org/bots/twitterbots/emoji__polls/
*/
var T = require("twit");
var Q = require("Q");
// key and secret for Twitter for iPhone.
// A whitelisted app is needed to access the cards API; you can't just create your own currently.
@andypiper
andypiper / CRC_Example.java
Last active December 31, 2020 09:45
Java snippet to generate Twitter Webhooks CRC response
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.codec.binary.Base64;
public class CRC_Example {
public static void main(String[] args) {
try {
String consumer_secret = "secret";
String crc_token = "Message";
@colemickens
colemickens / amiibo-emulation-with-linux-vm.md
Last active June 27, 2024 12:20
amiibo-emulation-with-linux-vm.md

Easy Amiibo Emulation - https://bit.ly/2z0m09k

(^ that's a short-link to this page, so you can open it in Linux)

Some users are discussing this guide in #hacking on the JoyConDroid Discord: https://discord.gg/SQNEx9v.

DO NOT ask for, or share links to, Amiibo bins in the comments! They will be removed. Thank you for understanding.

(Windows|Linux PC) + JoyControl + Bluetooth = AMIIBO EMULATION

@pojntfx
pojntfx / main.sh
Last active July 16, 2024 10:21
Bluesky/AT Protocol: cURL API Interaction Cheatsheet
#!/bin/bash
# This script resolves a DID, retrieves an API key, fetches a user's feed,
# and posts a "Hello, world" message to the user's feed.
# Resolve DID for handle
HANDLE='felicitas.pojtinger.com'
DID_URL="https://bsky.social/xrpc/com.atproto.identity.resolveHandle"
export DID=$(curl -G \
--data-urlencode "handle=$HANDLE" \