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
html | |
head | |
meta charset="utf8" | |
script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.bundle.js" | |
script src="loader.js" | |
style type="text/css" | |
| | |
.wrapper { | |
width: 80%; |
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 | |
# requirements: ruby-pushbullet gem | |
require 'pushbullet' | |
if ARGV.count == 0 | |
name = __FILE__.tap { |f| break File.basename(f, File.extname(f)) } | |
warn "#{name} - An client of Pushbullet" | |
warn "Usage: #{name} [title] [file]" | |
warn "If no input files are specified, then the standard input is read." | |
exit 1 |
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 'pasori' | |
begin | |
Pasori.open do |p| | |
warn 'Waiting for a card...' | |
begin | |
p.felica_polling do |f| | |
warn 'Reading...' | |
puts sprintf("%016X", f.idm.unpack('Q>').first) | |
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
#!/bin/bash | |
# add mono repository | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list | |
# install mono-devel | |
sudo apt-get update | |
sudo apt-get install -y mono-devel |
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 | |
exec ruby -S -x "$0" "$@" | |
#! ruby | |
require 'time' | |
require 'open-uri' | |
require 'optparse' | |
## Example of execution | |
# timecrawler http://example.com/images/%Y%m%d/%H%M%S.png \ |
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
10 20 | |
60 20 | |
90 45 |
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 | |
set -eu | |
## tex to pdf | |
# ex.) pdfgen sample.tex | |
# ex.) pdfgen sample.tex | xargs evince | |
test $# -eq 1 || { | |
NAME="$(basename $0)" | |
echo "$NAME - generate a pdf file from the tex file" >&2 |
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 | |
if (ARGV.count != 2) | |
puts 'Invalid number of arguments.' | |
exit | |
end | |
a, b = ARGV.map { |s| s.to_i } | |
get_gcd = -> (m, n) do |
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/local/bin/ruby | |
start = Time.now | |
# --- arguments check | |
if (ARGV.count != 1) | |
puts 'Invalid number of arguments.' | |
exit 1 | |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
class Program | |
{ | |
// ref: https://github.com/OCTPC/miniprocon/blob/master/miniprocon003/regulation.md | |
int n, m; | |
List<int>[] g; |