Skip to content

Instantly share code, notes, and snippets.

hitode909 hitode909

Block or report user

Report or block hitode909

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
hitode909 / crawl.js
Created Dec 23, 2018
View crawl.js
function crawl() {
var content = UrlFetchApp.fetch("").getContentText();
var entries = content.match(/(\d+) 記事/)[1];
var subscribers = content.match(/(\d+) 人/)[1];
var sheet = SpreadsheetApp.openById("*************************").getSheetByName('data');
var newRow = [new Date(), +entries, +subscribers];
# Create a animation of of a rotating image.
# Some alpha composition is used to crop the result to the original size.
command="convert -delay 10 $1 -resize 50% -trim +repage -bordercolor white"
command="$command \\( +clone -border 1x1 -fill lightsteelblue"
command="$command -colorize 100% \\) -gravity center"
for i in `seq 100 -2 20 ;`; do
View oJqueryArgumentRule.ts
import * as ts from "typescript";
import * as Lint from "tslint";
export class Rule extends Lint.Rules.AbstractRule {
/* tslint:disable:object-literal-sort-keys */
public static metadata: Lint.IRuleMetadata = {
ruleName: "no-jquery-argument",
description: "Disallows receiving jQuery object in arguments.",
rationale: Lint.Utils.dedent`
Do not receive jQuery Object. You must receive HTMLElement or Array<HTMLElement>.
View interactive.rb
# replace HERE interactive, execute command.
# for example: ruby interactive.rb expr HERE + HERE + HERE
require 'readline'
require 'shellwords'
def read_input
Readline.readline("> ", true)
View theseus.rb
# git ls-files | ruby theseus.rb | sort | uniq -c
require 'time'
ARGF.each_line.each_with_index {|file, index|
blame = `git blame -c #{file}`.encode('utf-8', invalid: :replace, undef: :replace, replace: '').split(/\n/)
puts Time.parse(line.split(/\t/)[2]).year
View prt-introduce-variables.el
(defun prt-introduce-variables ()
(if mark-active
(let (
(resultbuf (get-buffer-create "*introduce-variables*"))
(with-current-buffer resultbuf
(setq buffer-read-only nil)
hitode909 /
Created Sep 20, 2016
use strict;
use warnings;
use URI;
use DateTime;
use Test::More;
package Immutable {
sub new {
my ($class, $obj) = @_;
bless {
View Gemfile
gem "urls", git: ""
hitode909 / urls
Last active May 27, 2016
Extract and print the URLs
View urls
require 'uri'
while line = gets
URI.extract(line, ['http', 'https']).each do |uri|
puts uri
hitode909 /
Created Mar 2, 2016
Registerable Hubot LGTM Command
# Description:
# Commands:
# hubot LGTM - LGTM
# hubot lgtm register <URL> - register a new LGTM
BRAIN_KEY = 'lgtm'
module.exports = (robot) ->
You can’t perform that action at this time.