I hereby claim:
- I am lann on github.
- I am lann (https://keybase.io/lann) on keybase.
- I have a public key whose fingerprint is 4AB3 17BB D5A2 E837 3161 AD52 7DEF EE0C 340C 16E6
To claim this, I am signing this object:
def help_text(): | |
from textwrap import dedent | |
print dedent(""" | |
If you do this, | |
it will print correctly | |
without looking so ugly in code.""") | |
help_text() |
module Reqtrace | |
@trace_file = File.open('/tmp/reqtrace.txt', 'w') | |
@name_stack = [nil] | |
@time_stack = [0] | |
def self.trace(name, &blk) | |
@name_stack << name | |
@time_stack << 0 | |
start = Time.now |
[alias] | |
g = !env GIT_PAGER='gawk -f ~/file-alias-pager.awk | less' git grep |
Class.new(ActiveSupport::LogSubscriber) do | |
def sql(event) | |
query = event.payload[:sql] | |
if query.length > 10_000 | |
Rails.logger.info "Large query: #{query}" | |
Rails.logger.info '!stacktrace!begin' | |
Rails.logger.info Rails.backtrace_cleaner.clean(caller).join("\n") | |
Rails.logger.info '!stacktrace!end' | |
end | |
end |
#!/bin/bash | |
SOCK_SYMLINK=~/.ssh/ssh_auth_sock | |
[ -r $SSH_AUTH_SOCK ] && ln -sf $SSH_AUTH_SOCK $SOCK_SYMLINK | |
env SSH_AUTH_SOCK=$SOCK_SYMLINK tmux $@ attach |
I hereby claim:
To claim this, I am signing this object:
require 'tcp_timeout' | |
server = 'stackoverflow.com' | |
begin | |
socket = TCPTimeout::TCPSocket.new(server, 80, read_timeout: 1) | |
socket.read(100) | |
rescue TCPTimeout::SocketTimeout => e | |
puts "[!] #{server} Timeout" | |
end |
// Comment | |
/* Block comment */ | |
type Type uint8 | |
type Ptr *Type | |
type Vec []Type | |
type Arr [5]Type | |
type Attrs u8 [ x = 1, y = "x" ] |
%text | |
class: "branding" | |
value: "todos" | |
%vbox | |
%hbox | |
%button | |
image: chevron-down | |
action: `select_all()` | |
#!/usr/bin/env bash | |
set -eu | |
case "${1:-now}" in | |
now) ;; | |
log) git reflog 'AUTOSAVE@{now}'; exit 0 ;; | |
expire) git reflog expire AUTOSAVE; exit 0 ;; | |
*) echo "git autosave [now,log,expire]"; exit 1 ;; | |
esac |