Skip to content

Instantly share code, notes, and snippets.

View kwas python quine
A quine is program that prints itself
@solarkennedy
solarkennedy / analyze.sh
Created Feb 25, 2018
List of mesos frameworks in the DC/OS Universe
View analyze.sh
#!/bin/bash
[[ -d universe ]] || git clone git@github.com:mesosphere/universe.git
for package_folder in universe/repo/packages/*/*; do
pushd "${package_folder}" 1>/dev/null
latest=$(ls -1 | sort -rn | head -n 1)
if [[ "$(jq -r .framework $latest/package.json)" == "true" ]]; then
jq -r .name "$latest/package.json"
fi
popd 1>/dev/null
@solarkennedy
solarkennedy / troll-yaml output
Last active Mar 29, 2018
A demonstration of some surprising yaml junk
View troll-yaml output
$ uq troll-yaml.yaml
{
"favorite_prog_rock_band": true,
"homedir_location": null,
"homedir_permissions": 292,
"really long string": " what if seinfeld still on TV today ",
"ssl_expire_date": "2014-29-37",
"start_date": 2.013051e+07
}
View gist:f7647741dd9526e5b9b0cfbab7e244ab
{
"id": "/yelp-main.internalapi.gite3960c38.config4bc070b4",
"cmd": null,
"cpus": 4,
"mem": 7800,
"disk": 2048,
"instances": 3,
"constraints": [
[
"region",
@solarkennedy
solarkennedy / jmap-heap
Created Jun 8, 2017
marathon jmap west coast yelp 2017-06-08
View jmap-heap
num #instances #bytes class name
----------------------------------------------
1: 1712454 1103849480 [C
2: 9283373 297067936 scala.collection.mutable.LinkedEntry
3: 291299 216661240 [I
4: 1991603 205102056 [Ljava.lang.Object;
5: 2321861 197259472 [Lscala.collection.mutable.HashEntry;
6: 2317144 111222912 scala.collection.mutable.LinkedHashMap
7: 5921839 94749424 play.api.libs.json.JsString
8: 302322 81117296 [B
View gist:49eaf67e6d167433e53cae7cc075e69a
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.92-b14 mixed mode):
"ForkJoinPool-2-worker-45" #352179 daemon prio=5 os_prio=0 tid=0x00007f4ede1ec000 nid=0x30d9 waiting on condition [0x00007f50dc245000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000005c08df158> (a scala.concurrent.forkjoin.ForkJoinPool)
at scala.concurrent.forkjoin.ForkJoinPool.scan(ForkJoinPool.java:2075)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
View gist:39fc532d7d42474d7cb86f39d91fc9ac
This file has been truncated, but you can view the full file.
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.92-b14 mixed mode):
"ForkJoinPool-2-worker-41" #396850 daemon prio=5 os_prio=0 tid=0x00007f826800a000 nid=0x13a3c waiting on condition [0x00007f83b39fa000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000005c0906098> (a scala.concurrent.forkjoin.ForkJoinPool)
at scala.concurrent.forkjoin.ForkJoinPool.scan(ForkJoinPool.java:2075)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
View mysql-python-changelog.md

Change Log

Unreleased

Full Changelog

Closed issues:

  • compile failing on Centos7 - MariaDB 10.2, python 3.5 #160
  • error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64 #159
@solarkennedy
solarkennedy / _instructions.sh
Last active Nov 7, 2015
img2xterm comparison
View _instructions.sh
# To see the differences in your native terminal:
echo "Original img2xterm"
wget -O - https://gist.github.com/solarkennedy/2544a9fe9ff4d76bedbc/raw/5cdba46e06c81815f80838a1c3b58f41cd659cc3/bender.img2xterm.ascii
echo
echo "New libpng img2xterm"
wget -O - https://gist.github.com/solarkennedy/2544a9fe9ff4d76bedbc/raw/5cdba46e06c81815f80838a1c3b58f41cd659cc3/bender.new-img2xterm.ascii
@solarkennedy
solarkennedy / sbv2srt.py
Created Oct 4, 2015
Script to convert youtube sbv captions to srt captions
View sbv2srt.py
#!/usr/bin/env python
from captionstransformer.sbv import Reader
from captionstransformer.srt import Writer
r = open('captions.sbv')
reader = Reader(r)
w = open('captions.srt', 'w')
writer = Writer(w)
You can’t perform that action at this time.