Skip to content

Instantly share code, notes, and snippets.

View keekerdc's full-sized avatar

Chris Schetter keekerdc

View GitHub Profile
@keekerdc
keekerdc / planetscale_dev.exs
Created December 6, 2021 04:01 — forked from sourdoughdev/config.exs
Connecting to PlanetScale DB from Phoenix (elixir)
# config/dev.exs
# Now running migrations will be: PSCALE=1 mix ecto.migrate
db_name = if System.get_env("PSCALE"), do: "db_name", else: "db_name_dev"
db_hostname = if System.get_env("PSCALE"), do: "127.0.0.1", else: "localhost"
db_port = if System.get_env("PSCALE"), do: 3305, else: 3306
# Configure your database
config :db_name, db_name.Repo,
username: "root",
@keekerdc
keekerdc / twitter-nuke.md
Last active December 27, 2019 19:06
Nuking your twitter without deleting the account, with ruby and t

This approach requires a proper shell, a working Ruby installation, and some basic unix programs like grep and tr. If we're already in too deep for you, bribe a friendly nerd with some food or something to help you; walking you through setup of these things, especially if you're on Windows, will probably result in more frustration than it's worth, and is way outside the scope here. This can be time consuming, but it's not terribly technically challenging, so preferrably find someone you like, because you're going to be hanging out a bit.

The good news is this approach is far less time consuming than trying to do this through any other client; the web app in particular requires three clicks per tweet, constant scrolling, and makes it impossible to delete RTs made before the Aug 2015 syntax switch. It's still going to take you a while, especially if you've pushed up over 10k or 20k tweets; more than that and this will still likely be a multi-day project. Due to limitations of the Twitter API, and some foib

Keybase proof

I hereby claim:

  • I am keekerdc on github.
  • I am keekerdc (https://keybase.io/keekerdc) on keybase.
  • I have a public key whose fingerprint is A5A6 9562 D2C5 03EB BC7D 6034 5379 4660 8A85 DD9F

To claim this, I am signing this object:

@keekerdc
keekerdc / gist:4506510
Created January 10, 2013 22:52
zsh theme
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
function get_pwd() {
print -D $PWD
}
function battery_charge() {
@keekerdc
keekerdc / serverhere.sh
Created December 8, 2012 19:41
Open SimpleHTTPServer at current directory with given port
#instant server
simple(){ open http://localhost:${1-'8000'} && python -m SimpleHTTPServer ${1-'8000'} }
alias serverhere=simple
# $ serverhere
# => opens server on default port 8000
# $ serverhere 4500
# => opens server on port 4500