Skip to content

Instantly share code, notes, and snippets.

# save path on cd (chpwd is a zsh hook)
function chpwd {
pwd > ~/.last_dir
}
# restore last saved path on launch
if [[ -f ~/.last_dir ]]; then
cd $(cat ~/.last_dir)
fi
$ ./mach check -v
Fresh unicode-segmentation v1.2.0
Fresh language-tags v0.2.2
Fresh khronos_api v2.0.0
Fresh bitflags v0.9.1
Fresh lazycell v0.4.0
Fresh pkg-config v0.3.9
Fresh fnv v1.0.5
Fresh sig v0.1.1
Fresh lzw v0.10.0
(gdb) p textinput
$6 = core::cell::RefMut<script::textinput::TextInput<script_traits::ScriptToConstellationChan>> {value: 0x7fffeca35e48, borrow: core::cell::BorrowRefMut {borrow: 0x7fffeca35e40}}
(gdb) p textinput.get_absolute_selection_range()
Could not find function named 'core::cell::RefMut<script::textinput::TextInput<script_traits::ScriptToConstellationChan>>::get_absolute_selection_range'
(gdb) info functions get_absolute_selection_range
All functions matching regular expression "get_absolute_selection_range":
File components/script/textinput.rs:
static fn script::textinput::TextInput<script_traits::ScriptToConstellationChan>::get_absolute_selection_range<script_traits::ScriptToConstellationChan>(script::textinput::TextInput<script_traits::ScriptToConstellationChan> *) -> core::ops::range::Range<usize>;
(gdb) p textinput.get_absolute_selection_range<script_traits::ScriptToConstellationChan>()
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>initial selection test</title>
</head>
<body id="home">
<form>
<input type="text" value="test">
<textarea>test</textarea>
WARNING: [Bourbon] [Deprecation] `linear-gradient` is deprecated and will be removed in 5.0.0. We suggest using an automated prefixing tool, like Autoprefixer.
on line 10 of /home/turnip/.gem/ruby/2.4.0/gems/bourbon-4.3.2/app/assets/stylesheets/_bourbon-deprecate.scss, in `_bourbon-deprecate'
from line 17 of /home/turnip/.gem/ruby/2.4.0/gems/bourbon-4.3.2/app/assets/stylesheets/_bourbon-deprecate.scss, in `_bourbon-deprecate-for-prefixing'
from line 7 of /home/turnip/.gem/ruby/2.4.0/gems/bourbon-4.3.2/app/assets/stylesheets/css3/_linear-gradient.scss, in `linear-gradient'
from line 134 of /home/turnip/Code/wikihouse.cc/app/assets/stylesheets/_landing.scss
from line 34 of /home/turnip/Code/wikihouse.cc/app/assets/stylesheets/application.scss
WARNING: [Bourbon] [Deprecation] `_linear-positions-parser` is deprecated and will be removed in 5.0.0.
on line 3 of /home/turnip/.gem/ruby/2.4.0/gems/bourbon-4.3.2/app/assets/stylesheets/helpers/_linear-positions-pars

Keybase proof

I hereby claim:

  • I am jonleighton on github.
  • I am jonleighton (https://keybase.io/jonleighton) on keybase.
  • I have a public key whose fingerprint is F2BB 4F53 1DDB FCF6 6D9D AF23 3652 F01B 67BA C232

To claim this, I am signing this object:

@jonleighton
jonleighton / code.ex
Created February 9, 2017 18:41
Which is better?
# Option 1
list |> List.wrap |> Enum.map(&(&1["value"]))
# Option 2
Enum.map(List.wrap(list), &(&1["value"]))
#!/bin/bash
set -e
export AWS_REGION="eu-west-1"
export COMMIT_ID=$1
# Docker Hub account with read-only access to the repository
export DOCKER_HUB_USERNAME="[FILL ME IN]"
export DOCKER_HUB_PASSWORD="[FILL ME IN]"
2016/09/21 14:18:58 [INFO] Terraform version: 0.7.4 84592f5967490d118aae0b61a25d589d269fd0b6
2016/09/21 14:18:58 [INFO] CLI args: []string{"/home/turnip/bin/terraform", "apply", "-var", "librato_email=j@jonathanleighton.com", "-var", "librato_token=1735465086d06fb1d39c780d1a6e432455e17e41b36b7a76bc5233fb39f64025"}
2016/09/21 14:18:58 [DEBUG] Detected home directory from env var: /home/turnip
2016/09/21 14:18:58 [DEBUG] Detected home directory from env var: /home/turnip
2016/09/21 14:18:58 [DEBUG] Attempting to open CLI config file: /home/turnip/.terraformrc
2016/09/21 14:18:58 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2016/09/21 14:18:58 [DEBUG] Detected home directory from env var: /home/turnip
2016/09/21 14:18:58 [DEBUG] New state was assigned lineage "8966f5eb-cca1-45cf-85b3-105d2aac0210"
2016/09/21 14:18:58 [DEBUG] Checking variable noop: var.librato_token
2016/09/21 14:18:58 [DEBUG] No diff, not a noop
2016/09/21 14:06:24 [INFO] Terraform version: 0.7.4 84592f5967490d118aae0b61a25d589d269fd0b6
2016/09/21 14:06:24 [INFO] CLI args: []string{"/home/turnip/bin/terraform", "apply", "-var", "librato_email=j@jonathanleighton.com", "-var", "librato_token=1735465086d06fb1d39c780d1a6e432455e17e41b36b7a76bc5233fb39f64025"}
2016/09/21 14:06:24 [DEBUG] Detected home directory from env var: /home/turnip
2016/09/21 14:06:24 [DEBUG] Detected home directory from env var: /home/turnip
2016/09/21 14:06:24 [DEBUG] Attempting to open CLI config file: /home/turnip/.terraformrc
2016/09/21 14:06:24 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2016/09/21 14:06:24 [DEBUG] Detected home directory from env var: /home/turnip
2016/09/21 14:06:24 [DEBUG] Checking variable noop: var.librato_token
2016/09/21 14:06:24 [DEBUG] No diff, not a noop
2016/09/21 14:06:24 [DEBUG] Checking resource noop: librato_service.default