Skip to content

Instantly share code, notes, and snippets.

tobynet tobynet

  • Toyama, Japan
Block or report user

Report or block tobynet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tobynet
tobynet / generate-badge.rb
Created Feb 13, 2014
The badge generator for ruby
View generate-badge.rb
#!/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 Feb 16, 2014
Trying Docker with CoreOS and Vagrant
View setup-docker-using-coreos-and-vagrant.sh
#!/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 Aug 29, 2015
コマンドラインから選んで即FavしたりRTするやつ (tw gem でとってきたタイムラインを percol で選択して、 tw gem でFavったりRTする)
View fav
#!/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 )
View saveAsPdf.ps1
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
View miku_beam.rb
# -*- 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 Aug 29, 2015 — forked from firstspring1845/miku_beam.rb
Mikutter プラグインのみくビームを汎用的にして、earthquake.gem pluginに移植
View miku_beam.rb
# -*- coding: utf-8 -*-
#
# Miku beam plugin for earthquake.gem
#
# Usage:
# :mikubeam
# update 'みくビーム!みくみくみくみくwwwwwwww'
#
# :javabeam ねこ
# update 'ねこビーム!ねこねこねこねこwwwwwwww'
@tobynet
tobynet / javabeam.rb
Last active Aug 29, 2015 — forked from firstspring1845/java_beam.rb
Mikutter のプラグインJavaビームプラグインをearthquake.gem Pluginに移植したもの
View javabeam.rb
# -*- coding: utf-8 -*-
# Java beam plugin for earthquake.gem
#
# Usage:
# :javabeam
# update 'Javaビームビビビビビビビwwwwwwwwww'
#
# :javabeam 猫
# update '猫ビームビビビビビビビwwwwwwwwww'
#
@tobynet
tobynet / fsharp-playground_01_functional-composition-and-pipeline-operation.fsx
Last active Aug 29, 2015
The playground about functional composition and pipeline operation in F#
View fsharp-playground_01_functional-composition-and-pipeline-operation.fsx
// 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
You can’t perform that action at this time.