This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env elixir | |
# https://elixirquiz.github.io/2014-11-01-game-of-life.html | |
defmodule Conway do | |
defstruct lookup: HashDict.new, rows: 0, cols: 0 | |
def run_file(filename) do | |
case load_file(filename) do | |
{:ok, initial_state} -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/bin/curl -k -F apikey=xxxxxxx -F application=Transmission -F event="Download Complete" -F description="$TR_TORRENT_NAME completed on $TR_TIME_LOCALTIME" https://api.prowlapp.com/publicapi/add |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'win32ole' | |
e=WIN32OLE::connect "Excel.Application" | |
e.Sheets.Count.times do |n| | |
sheet = e.Sheets(n + 1) | |
v = sheet.UsedRange.Value2 | |
puts "=== Sheet: #{sheet.Name}" | |
v.each do |row| | |
puts row.map {|x| x || ""}.join "\t" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hash | |
class << self | |
def from_block() | |
Hash[Enumerator.new {|yielder| yield yielder }.to_a] | |
end | |
end | |
end | |
Hash::from_block do |yielder| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$excel.Range('A4').Value = 'Remote Set' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl -w | |
# To run on linux, install the following packages: | |
# sudo apt-get install libdbd-xbase-perl | |
# sudo apt-get install libdbi-perl | |
# | |
# To run without downloading and creating the perl file, type: | |
# cd /path/to/step7/project | |
# curl -s -L https://raw.github.com/gist/3899286/s7unprotect.pl | perl | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ffi' | |
require 'socket' | |
require_relative 'nodave_constants' | |
module Nodave | |
include NodaveConstants | |
extend FFI::Library | |
ffi_lib 'libnodave' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TableHash | |
# creates a Hash from a table structure | |
# | |
# TableHash[ | |
# 4, | |
# :key, :a, :b, :c, | |
# 'first', 10, 11, 12, | |
# 'second', 20, 30, 40 | |
# ] | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://code.google.com/p/apt-cyg/ | |
apt-cyg show | |
The following packages are installed: | |
_autorebase | |
_update-info-dir | |
alternatives | |
autoconf | |
autoconf2.1 | |
autoconf2.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Tallak Tveide | |
email = [email protected] | |
[core] | |
editor = /usr/bin/vim | |
excludesfile = /cygdrive/c/Users/tveidet/.gitignore_global | |
autocrlf = false | |
[diff "excel"] | |
textconv = strings | |
[diff "word"] |