Skip to content

Instantly share code, notes, and snippets.

@jshanley
jshanley / color-replacements.scss
Created January 31, 2020 16:06
Replacement values for legacy colors
// Find and replace
$grayCinder: #222A2E;
// $midnight: #0D183A;
$gray800: #2F363D;
$gray900: #24292E;
$grayDarkest: #445158;
// $gray700: #444D56;
@jshanley
jshanley / python_strings.md
Created September 18, 2018 15:50
Python 2/3 str bytes unicode

In Python 2.x str and bytes are exactly the same thing.

In Python 3.x, bytes is a separate class, str is always unicode, and the unicode type was removed from the language.

Consider these two examples from the interpreter:

# Python 2.x
>>> str

Keybase proof

I hereby claim:

  • I am jshanley on github.
  • I am jshanley (https://keybase.io/jshanley) on keybase.
  • I have a public key whose fingerprint is 0EB9 5D12 0C12 7E87 6DE6 6FC7 3718 F79C 6F66 9B06

To claim this, I am signing this object:

@jshanley
jshanley / index.html
Created October 2, 2014 16:29
Simple Force Layout Example
<!DOCTYPE html>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
<body>
<script src="script.js"></script>
</body>
@jshanley
jshanley / index.html
Last active August 29, 2015 14:03
SO-24688415
<!DOCTYPE html>
<meta charset="utf-8">
<style>
path {
fill: none;
stroke-linejoin: round;
}
.sphere,
@jshanley
jshanley / flare.json
Last active August 29, 2015 14:03
d3.layout.partition issue response
{
"name": "flare",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{"name": "AgglomerativeCluster", "size": 3938},