Skip to content

Instantly share code, notes, and snippets.

View tobynet's full-sized avatar

tobynet tobynet

  • Toyama, Japan
View GitHub Profile
@tobynet
tobynet / The Story of Position Absolute.markdown
Created August 28, 2015 01:23
The Story of Position Absolute
@tobynet
tobynet / generate-badge.rb
Created February 13, 2014 14:30
The badge generator for ruby
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
# Implementations
module CodeBadge
DEFAULT_README = 'README.md'
class << self
# TODO: Move tempaltes to badges.yml
def template(type, user_name, project_name, gem_name = project_name, branch = "master")
@tobynet
tobynet / setup-docker-using-coreos-and-vagrant.sh
Created February 16, 2014 13:20
Trying Docker with CoreOS and Vagrant
#!/usr/bin/env bash
set -o xtrace # For debugging. ( abbr. set -x )
set -o errexit # To exit on error. ( abbr. set -e )
set -o pipefail # To exit on error in pipe
set -o nounset # To exit when the script to use undeclared variables (abbr. set -u)
TARGET_DIR=docker-using-coreos
if [ -d "$TARGET_DIR/.git"]; then
git clone https://github.com/coreos/coreos-vagrant "$TARGET_DIR"
@tobynet
tobynet / fav
Last active August 29, 2015 13:56
コマンドラインから選んで即FavしたりRTするやつ (tw gem でとってきたタイムラインを percol で選択して、 tw gem でFavったりRTする)
#!/usr/bin/env bash
# # Requirements:
#
# * percol : https://github.com/mooz/percol
# * tw gem : http://shokai.github.io/tw/
#set -o xtrace # for debug output. ( abbr. set -x )
set -o errexit # for exit on error. ( abbr. set -e )
@tobynet
tobynet / boy-33159_200left.png
Last active August 29, 2015 13:56
Images on gist
boy-33159_200left.png
function saveAsPdf($filename) {
echo ("Converting {0}" -f $filename)
$excel = New-Object -ComObject Excel.Application -Property @{visible=$false}
try {
$excel.AlertBeforeOverwriting = $true
$workbook = $excel.Workbooks.Open($filename)
$workbook.ExportAsFixedFormat(
[Microsoft.Office.Interop.Excel.XlFixedFormatType]::xlTypePDF ,
[Io.Path]::ChangeExtension($filename, '.pdf') ,
[Microsoft.Office.Interop.Excel.XlFixedFormatQuality]::xlQualityStandard
@tobynet
tobynet / javabeam.rb
Last active August 29, 2015 14:00 — forked from firstspring1845/java_beam.rb
Mikutter のプラグインJavaビームプラグインをearthquake.gem Pluginに移植したもの
# -*- coding: utf-8 -*-
# Java beam plugin for earthquake.gem
#
# Usage:
# :javabeam
# update 'Javaビームビビビビビビビwwwwwwwwww'
#
# :javabeam 猫
# update '猫ビームビビビビビビビwwwwwwwwww'
#
# -*- coding: utf-8 -*-
Plugin.create :miku_beam do
command(:miku_beam,
name: 'みくビーム',
condition: lambda{ |opt| true},
visible: false,
role: :window) do |opt|
Service.primary.post(:message => 'みくビーム!みくみくみくみくwwwwwwww')
end
end
@tobynet
tobynet / miku_beam.rb
Last active August 29, 2015 14:00 — forked from firstspring1845/miku_beam.rb
Mikutter プラグインのみくビームを汎用的にして、earthquake.gem pluginに移植
# -*- coding: utf-8 -*-
#
# Miku beam plugin for earthquake.gem
#
# Usage:
# :mikubeam
# update 'みくビーム!みくみくみくみくwwwwwwww'
#
# :javabeam ねこ
# update 'ねこビーム!ねこねこねこねこwwwwwwww'
@tobynet
tobynet / fsharp-playground_01_functional-composition-and-pipeline-operation.fsx
Last active August 29, 2015 14:06
The playground about functional composition and pipeline operation in F#
// Playground
// ref. http://msdn.microsoft.com/ja-jp/library/dd233229.aspx
//
// All results are... 'val it : string = "abcdef"'
//
// Bacward pipeline operators only
['a'..'f'] |> List.map string |> List.reduce (+)
// With a composition operator