Skip to content

Instantly share code, notes, and snippets.

View joesondow's full-sized avatar

Joe Sondow joesondow

View GitHub Profile
@joesondow
joesondow / main.sh
Created April 29, 2023 22:59 — forked from pojntfx/main.sh
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" \
@joesondow
joesondow / replies.py
Created January 2, 2021 12:16 — forked from edsu/replies.py
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 / CRC_Example.java
Created December 31, 2020 09:45 — forked from andypiper/CRC_Example.java
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";
@joesondow
joesondow / amiibo-emulation-with-linux-vm.md
Last active January 18, 2022 15:23 — forked from colemickens/amiibo-emulation-with-linux-vm.md
amiibo-emulation-with-linux-vm.md

Easy Amiibo Emulation - https://bit.ly/amiiboemu

(^ 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

/*
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.
/*
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.
@joesondow
joesondow / markov.java
Created February 16, 2017 08:42 — forked from veryphatic/markov.java
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 {
@joesondow
joesondow / markov.java
Created February 16, 2017 08:41 — forked from veryphatic/markov.java
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 {
@joesondow
joesondow / new_ruby_project_procedure.markdown
Created December 28, 2016 20:51
A walkthrough for creating a new Ruby project

New Ruby software project procedure

First, ensure the following tools are available on the local system and reasonably up to date:

  • Git
  • Git-flow
  • RVM
  • Bash
  • SSH
@joesondow
joesondow / blacklist.scpt
Created December 27, 2016 08:33 — forked from freman/blacklist.scpt
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