If you add the following CSS rule:
details > details {
padding-left: 20px;
}The following markup becomes a nested outline view:
If you add the following CSS rule:
details > details {
padding-left: 20px;
}The following markup becomes a nested outline view:
| #!/bin/sh | |
| # First generate a profile using https://github.com/tmm1/stackprof | |
| # StackProf.run(raw: true, out: "tmp/stackprof.dump) { something_expensive } | |
| # Then run this script | |
| # $ stackprof-to-flamegraph tmp/stackprof.dump | |
| set -e | |
| if [ "$STACKCOLLAPSE" = "1" ]; then | |
| template="/tmp/stackprof-$$" |
| " Put this in your .vimrc and whenever you `git commit` you'll see the diff of your commit next to your commit message. | |
| " For the most accurate diffs, use `git config --global commit.verbose true` | |
| " BufRead seems more appropriate here but for some reason the final `wincmd p` doesn't work if we do that. | |
| autocmd VimEnter COMMIT_EDITMSG call OpenCommitMessageDiff() | |
| function OpenCommitMessageDiff() | |
| " Save the contents of the z register | |
| let old_z = getreg("z") | |
| let old_z_type = getregtype("z") |
| class ProcessStats | |
| include Singleton | |
| def add_source(source) | |
| @sources << source | |
| end | |
| def snapshot | |
| Snapshot.new(@sources) | |
| end |
Based on reading https://github.com/ruby/ruby/blob/5a121a4f0b8fb9d416566f75047a190166d98609/array.c#L245-L258
Assuming code like:
array = []
loop { array.push(1) }| length | capacity |
| Index: textmate/Genshi.tmbundle/COPYING | |
| =================================================================== | |
| --- textmate/Genshi.tmbundle/COPYING (revision 0) | |
| +++ textmate/Genshi.tmbundle/COPYING (working copy) | |
| @@ -0,0 +1,28 @@ | |
| +Copyright (C) 2014 Edgewall Software | |
| +All rights reserved. | |
| + | |
| +Redistribution and use in source and binary forms, with or without | |
| +modification, are permitted provided that the following conditions |
| #!/bin/sh | |
| set -e | |
| curl -s -u $CAMPFIRE_TOKEN:X https://$CAMPFIRE_ACCOUNT.campfirenow.com/room/$CAMPFIRE_ROOM/transcript.json | jq -r '.messages | .[] | select(.body != null) | .body | select(startswith("/"))' | cut -d' ' -f1 | sort | uniq -c | sort -rn |
| #!/usr/bin/env ruby | |
| # Usage: GITHUB_TOKEN=yourtoken hissuegram.rb owner/repo | |
| require "octokit" | |
| client = Octokit::Client.new(:access_token => ENV["GITHUB_TOKEN"], :auto_paginate => true) | |
| issues = client.issues ARGV[0], :state => :open | |
| dates = issues.map { |i| i["created_at"] } |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| body { | |
| font-family: monospace, "Segoe UI Emoji"; | |
| } | |
| </style> | |
| </head> | |
| <body> |
| $.makeArray($('.capped-card')).map(function(e) { | |
| return [$(e).find('.aname').text(), parseInt($(e).find('.a').text().replace(/,/g, ''), 10), parseInt($(e).find('.d').text().replace(/,/g, ''), 10)]; | |
| }).filter(function(a) { | |
| return a[2] > a[1]; | |
| }).map(function(a) { | |
| return [a[0], a[2] - a[1], a[2] / a[1]]; | |
| }).sort(function(a, b) { | |
| return b[1] - a[1]; | |
| }).map(function(a) { | |
| return a[0] + " removed " + a[1] + " lines (" + a[2].toFixed(2) + "x as many lines as they added)"; |