$ brew install gist
$ gist --help
This file contains 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
1. Edit tweet.yaml. | |
2. Prepare tweet.txt (one line for one tweet). | |
3. Run tweet.pl. |
This file contains 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
## AutoGetter - Twitterで自分のツイートから自分へのリプライをまとめるRubyスクリプト(連ツイまとめ作成用) | |
https://gist.github.com/hyuki0000/85989bcf78d1476d74d3 | |
1. config.yamlを自分用に作成する。 | |
2. ruby autogetter.rb を実行する。 | |
3. 自分へのリプライ(リプライ連鎖)ごとに 1.html, 2.html, 3.html, ... とファイルにまとめる(既存ファイル上書き)。 | |
4. HTMLが直接書けるサイトに貼り付ける。 |
This file contains 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 | |
url = `git config remote.origin.url` | |
puts "BEFORE: #{url}" | |
# https://YOURNAME@example.com/YOURNAME/myrepo.git | |
if url.match(/https:\/\/([^\/@]+@)?([^\/]+)\/([^\/]+)\/(.+)\.git/) | |
optional_login_name, domain, name, repo = $1, $2, $3, $4 | |
cmd = "git remote set-url origin git@#{domain}:#{name}/#{repo}.git" | |
puts cmd |
This file contains 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/ruby | |
require 'open-uri' | |
SLEEP_SEC = 1 | |
API_URL = "http://salvageon.textfile.org/" | |
def puts_output(db, index) | |
output = URI("#{API_URL}?db=#{db}&index=#{index}").read |
This file contains 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/ruby | |
require "fileutils" | |
if ARGV.length != 2 | |
puts <<-"EOD" | |
Which figure files are not used during LaTeXing? | |
Usage: ruby not-used-fig.rb LOGDIR FIGDIR | |
Example: ruby not-used-fig.rb . fig | |
LOGDIR contains *.log files. |
This file contains 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
\documentclass[a5paper,10pt]{jsbook} | |
\usepackage[dvipdfmx]{color} | |
\usepackage[dvipdfmx]{graphicx} | |
\usepackage{amsmath} | |
\usepackage{amssymb} | |
\usepackage{amscd} | |
\usepackage{euler} | |
\usepackage{okumacro} | |
\usepackage{colortbl} | |
\usepackage{otf} |
This file contains 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
public class Test { | |
public static void main(String[] args) { | |
System.out.println("Hello."); | |
} | |
} |
This file contains 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
javac Triangle.java | |
appletviewer index.html |