Skip to content

Instantly share code, notes, and snippets.

@noirotm
noirotm / csv.md
Created September 20, 2019 12:43

CSV:

a,b,c,d
0,1,2,3
5,8,3,1

Equivalent YAML:

---
@noirotm
noirotm / fixtags.sh
Created January 18, 2016 10:05
Script to rename Git tags from X.Y.Z to vX.Y.Z
#!/bin/sh
git for-each-ref --shell --format="ref=%(refname:short)" refs/tags | \
while read entry
do
# assign tag name to $ref variable
eval "$entry"
# test if $ref starts with v
@noirotm
noirotm / swfcc.rb
Last active August 29, 2015 14:07
Ruby script for Windows using JSFL to compile a .fla file into a .swf.
=begin
This script leverages JSFL to automatically build a FLA file.
=end
require 'pathname'
require 'tempfile'
require 'win32/registry'
# input and output filename
@noirotm
noirotm / gist:7300224
Created November 4, 2013 09:33
bump_version.rb
#!/usr/bin/ruby
VERSION_FILE = File.dirname(__FILE__) + "/version.h"
# get version
contents = File.read(VERSION_FILE)
major, minor, patch = contents.match(/#define VER_PRODUCTVERSION_STR "(\d+)\.(\d+)\.(\d+)"/)[1..3].collect {|e| e.to_i}
old_version = "#{major}.#{minor}.#{patch}"
# bump