Skip to content

Instantly share code, notes, and snippets.

@kwharrigan
kwharrigan / inode_test.sh
Last active April 30, 2016 19:23
Play around with inode allocation
# Example 1 - Remove file after every iteration... note inodes are
# often reused after each deletion
for i in {1..1000}; do
filename=/tmp/file$i
echo "Creating " $filename
echo "blahblah" > $filename
stat -c "%i" $filename
echo "Removing " $filename
rm $filename
done
@kwharrigan
kwharrigan / sha.sh
Created March 11, 2016 14:49
sha256 fingerprint on old ssh
awk '{print $2}' ssh_host_rsa_key.pub | base64 -d | sha256sum -b | awk '{print $1}' | xxd -r -p | base64
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kwharrigan
kwharrigan / tree.js
Created July 22, 2014 06:11
Basics for visualizing GIT history using d3 from some json. Makes a tooltip out of the details.
var commits = [
{
"parent": "e98bb31",
"commit": "fb3a06f49b06fd7358c46c153b35ff6a29cd33cd",
"author": "Kyle Harrigan <[email protected]>",
"date": "Mon Mar 5 20:12:12 2012 -0500",
"message": "Fortran-examples-and-automake-scripts"
},
{
"parent": "3475367",
git log -n 3 --pretty=format:'{%n "parent": "%P", %n "commit": "%H",%n "author": "%an <%ae>",%n "date": "%ad",%n "message": "%f"%n},' | sed -e '1i\
[' -e '$s/,/]/g' > tmp.json

SVG fragment builds for reveal.js

Basic use case

  • make an SVG (maybe in inkscape)
    • save it someplace reveal.js can find it (maybe next to your presentation)
    • figure out how to identify them (maybe use named layers)
  • in reveal.js/index.html
    • add reveal-svg-fragment.js as a dependency
    • in a <section> of reveal.js markup
  • add data-svg-fragment="" to something, e.g.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.