Skip to content

Instantly share code, notes, and snippets.


Almog Melamed Radagaisus

View GitHub Profile
hvr / gist:662196
Created November 4, 2010 07:02
Show key fingerprints of public keys in .ssh/authorized_keys file
View gist:662196
( while read L
do echo $L > /tmp/pubkey
printf "%-16s => " $(cut -f 3 -d ' ' /tmp/pubkey)
ssh-keygen -l -f /tmp/pubkey
rm /tmp/pubkey
) < .ssh/authorized_keys
DanHulton / gist:993415
Created May 26, 2011 15:58 — forked from hashmal/gist:803816
Playing with CoffeeScript, do funny things with mixins.
View gist:993415
# Swappable Mixins in CoffeeScript
# ================================
# Many thanks to Hashmal, who wrote this to start.
# Usage
# -----
# class Derp extends Mixin
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations
View gist:1630790

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

czottmann / example.js
Created April 16, 2012 13:28
Underscore.template: Super-simple/-stupid partials. It's quick and dirty yet it does what I want, so there.
View example.js
// Fetch the template HTML from the DOM, hand it over to `Underscore.template`,
// assign some variables, and set up a `partial` method.
var template = $("#tmpl-main-section").html(),
compiledTemplate = _.template( template, {
models: aCollectionOfThings,
// See template examples below on usage. It's all very complex.
partial: function( partialName, variables ) {
return _.template(
$( "#tmpl-" + partialName ).html(),
heuristicfencepost /
Created July 10, 2012 06:49
GEB MIU system in various languages
# Simple implementation of the productions for the MIU system
open INFILE,"<",$ARGV[0];
while(<INFILE>) {
next if $_ =~ /#.*/;
print "$1IU\n" if $_ =~ /^(.+?)I$/;
print "M$1$1\n" if $_ =~ /^M(.+)$/;
print "$1U$2\n" if $_ =~ /^(.*)III(.*)$/;
print "$1$2\n" if $_ =~ /^(.*)UU(.*)$/;
igrigorik / json-bq-schema-generator.rb
Last active November 3, 2022 17:34
BigQuery JSON schema generator
View json-bq-schema-generator.rb
require 'open-uri'
require 'zlib'
require 'yajl'
# References
# -
# -
def type(t)
mrdrozdov /
Last active December 28, 2018 22:10
Logging in Tensorflow
from tf_logger import TFLogger
""" Example of using TFLogger to save train & dev statistics. To visualize
in tensorboard simply do:
tensorboard --logdir /path/to/summaries
This code does depend on Tensorflow, but does not require that your model
is built using Tensorflow. For instance, could build a model in Chainer, then
slode /
Last active June 11, 2020 03:39
A faster numpy pad algorithm where the padding mode is symmetric along the axes.
MIT License
Copyright (c) 2017 Stian Lode,
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell