Skip to content

Instantly share code, notes, and snippets.

@havenwood
havenwood / compile.rb
Last active November 9, 2017 05:05
Little script using mruby to compile to self-executable
#!/usr/bin/env ruby
class Compiler
def initialize
@mruby_dir = '/Users/shannonskipper/.rubies/mruby'
sanity_check_argv
@file = ARGV.first.sub /.rb$/, ''
end
def run
@d3noob
d3noob / index.html
Last active September 1, 2018 04:15
Overlay example for leaflet.js
<!DOCTYPE html>
<html>
<head>
<title>Simple Leaflet Map</title>
<meta charset="utf-8" />
<link
rel="stylesheet"
href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css"
/>
</head>
@byrney
byrney / gist:10a48dfb9de1cf894608
Created November 9, 2014 22:56
MSBUild Batching Up Items
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<DirRoot>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))</DirRoot>
</PropertyGroup>
<ItemGroup>
<TextFiles Include="$(DirRoot)/src/**/*.txt" Condition="'$(Solution)' == ''" />
<TextFiles Include="$(Solution)" />
@Turbo87
Turbo87 / app.js
Created February 15, 2015 04:05
webpack + font-awesome test
require('font-awesome/css/font-awesome.css');
document.body.innerHTML = '<i class="fa fa-fw fa-question"></i>';
@chrismytton
chrismytton / yaml2json.sh
Created October 19, 2016 15:32
Shell function to convert YAML to JSON
yaml2json () {
ruby -r yaml -r json -e 'puts YAML.load($stdin.read).to_json'
}