Skip to content

Instantly share code, notes, and snippets.

View codeout's full-sized avatar

Shintaro Kojima codeout

View GitHub Profile
@codeout
codeout / background.js
Created May 22, 2014 11:10
chrome.webRequest patch for autopagerize
diff --git a/src/background.js b/src/background.js
index 9c0b369..e406ec8 100644
--- a/src/background.js
+++ b/src/background.js
@@ -213,11 +213,11 @@ chrome.webRequest.onHeadersReceived.addListener(
details.responseHeaders,
xhrHeaderFinalURL, details.url
)
- return {
- cancel: !isSameOrigin(
bind generic ^b move-page-up
bind generic ^f move-page-down

問題: dnssec validation 環境下だと, IPv4アドレスが引けないレコードがある

  • 自宅にキャッシュDNSサーバーを置き, dnssec validation 環境を試しています
  • その中で見つけた IPv4アドレスが引けない & 原因がよくわからない ものです
    • たまたまアクセスしたサイトです 😄
    • たぶんわたし以外困っていません

うまくいかないレコード

@codeout
codeout / expand-url.el
Created April 18, 2015 17:11
Expand a shortened URL into the original
(defvar url-pattern "https\?://[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+")
(defun expand-url-region (beginning end)
"Expand shortened URLs within region."
(interactive "r")
(save-excursion
(goto-char beginning)
(setq expanded-text "")
(setq cursor beginning)
@codeout
codeout / im.kayac.rb
Created July 13, 2012 18:59
email notifier via im.kayac.com
#!/usr/bin/env ruby
#
# Read standard input or a file specified by the argument and notify devices
# via im.kayac.com.
#
# Usage:
#
# echo 'something' | $0 -u user_name -s secret
# $0 -u user_name -p password text_file
#
@codeout
codeout / anti_ddos.coffee
Last active October 9, 2015 15:39
NodeJS script: Open a github issue to mitigate DDoS
# Description
# Open a github issue to mitigate DDoS
#
# Commands:
# hubot anti ddos <path> <title>\n<yaml data> - Open a github issue with template and data
#
# Author:
# Shintaro Kojima <goodies@codeout.net>
yaml = require('js-yaml')
@codeout
codeout / diff.rb
Last active December 2, 2015 21:46
#!/usr/bin/env ruby
require 'easy_diff'
require 'junoser'
require 'net/http'
require 'rugged'
require 'uri'
class Tracker
require 'json'
require 'net/http'
require 'uri'
require 'webrick'
class Receiver
def initialize(pattern, slack_endpoint)
@pattern = pattern
@endpoint = slack_endpoint
end
@codeout
codeout / juniper.md
Last active December 15, 2015 14:38
Juniper: load override with GitHub Private Repo
load override https://<GitHub User Name>%2Ftoken:<Personal Access Token>@raw.githubusercontent.com/<GitHub User Name>/<Repository Name>/<Git Branch Name>/path/to/file
@codeout
codeout / dot.emacs.el
Created May 17, 2013 15:02
w3m configuration for Eijiro lookup (M-x eijiro)
(defadvice w3m-header-arguments (around alc activate)
"If URL matches with \"alc.co.jp\", modify w3m-user-agent tentatively"
(if (string-match "alc.co.jp" url)
(let ((w3m-user-agent
"Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"))
ad-do-it)
ad-do-it))
(eval-after-load "w3m-search"
'(add-to-list