Skip to content

Instantly share code, notes, and snippets.

View jonahgeorge's full-sized avatar

Jonah George jonahgeorge

View GitHub Profile
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active June 16, 2024 21:36
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@rust-play
rust-play / playground.rs
Created May 13, 2018 17:08
Code shared from the Rust Playground
use std::collections::HashMap;
use std::fmt::Debug;
pub trait StaticBuilder {
fn build(&self) -> Box<HasName>;
}
struct UserBuilder;
impl StaticBuilder for UserBuilder {
@tylerchr
tylerchr / Span.php
Created December 18, 2017 17:25
Stack management example using opentracing-php API
<?php
namespace Tracing;
final class Span implements OTSpan
{
private $span;
function __construct($operationName, $tags = null)
{
@jondlm
jondlm / kdebug.bash
Last active February 20, 2019 09:24
Kubernetes Fuzzy Helper Scripts
#!/usr/bin/env bash
# vim: set syntax=sh:
set -e
if ! hash kubectl 2>/dev/null; then echo "Please install \`kubectl\` before running this command (https://kubernetes.io/docs/tasks/tools/install-kubectl/)"; exit 1; fi
if ! hash fzf 2>/dev/null; then echo "Please install \`fzf\` before running this command (https://github.com/junegunn/fzf#installation)"; exit 1; fi
selection=`kubectl get pods --all-namespaces | grep -v 'NAMESPACE' | fzf --header "Select a pod..."`
namespace=`echo "$selection" | awk '{ print $1 }'`
pod=`echo "$selection" | awk '{ print $2 }'`
@alexellis
alexellis / k8s-pi.md
Last active April 11, 2024 14:17
K8s on Raspbian
@humorless
humorless / neovim.md
Last active January 15, 2020 04:38
How to install neovim in Ubuntu-14.04 & using terminal mode

Install neovim in ubuntu 14.04

sudo add-apt-repository ppa:neovim-ppa/unstable 
sudo apt-get update
sudo apt-get install neovim

Using terminal mode

  1. Enter terminal mode
@stefansundin
stefansundin / download-slack-emoji.sh
Last active February 9, 2023 15:05
Download all of your Team's custom Slack emojis.
#!/bin/bash -eo pipefail
# Log in to Slack in a web browser and open the network tools to inspect the traffic.
# Filter the requests with "/api/" and pick one to inspect.
# You need the xoxc token from the request body, and a copy of the cookies. It is the "d" cookie that is important, but you can copy all of them. Make sure that the cookie value is percent encoded!
# Paste the values below.
# You need to have curl and jq installed.
# You can also get the xoxc token from localStorage. Run this in the JavaScript console:
# Object.entries(JSON.parse(localStorage.localConfig_v2)["teams"]).reduce((o,e) => Object.assign(o, { [e[1]["name"]]: e[1]["token"] }), {})
@hew
hew / _readme.md
Last active June 10, 2022 19:13
Operator Mono w/ Italics on OSX VIm

Operator Mono w/ Italics on OSX Vim

@jonahgeorge
jonahgeorge / .gitignore
Last active January 30, 2016 19:24 — forked from Lewuathe/shift.py
Optimal assignment of GTAs to Courses via ILP
__pycache__
@jonahgeorge
jonahgeorge / test_gen.rb
Created September 19, 2015 23:18
Generates Capybara tests for the rails_admin index page for all models.
models = Dir.glob("*.rb")
def spec(model)
template = <<-END
scenario "#{model}" do
visit rails_admin.index_path(model_name: "#{model}")
page.status_code.must_equal 200
page.assert_current_path rails_admin.index_path(model_name: "#{model}")
end