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 | |
if ! which unlimited-blade-works &>/dev/null; then | |
echo "Farewell. Drown in your ideals and die." >&2 | |
exit 1 | |
fi | |
candidate=$(unlimited-blade-works --no-bgm --single-action) | |
while true; do | |
echo -n "would you like to mkdir \"$candidate\" ? [Y/n]: " |
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
// ==UserScript== | |
// @name SmartSubmit for AtCoder | |
// @version 0.200001 | |
// @auther anta | |
// @description 問題閲覧画面で Ctrl+V をするだけで提出します。yukicoder <http://yukicoder.me/> の機能・コードを元にしています。 | |
// @match http://*.contest.atcoder.jp/* | |
// @match https://*.contest.atcoder.jp/* | |
// @grant GM_getValue | |
// @grant GM_setValue | |
// @grant GM_listValues |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>jQuery実行タイミングの確認</title> | |
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script> | |
// パターン1 | |
$(window).load(function() { | |
alert("これはwindow.loadのタイミングです。"); |
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
var getIP = function (req) { | |
if (req.headers['x-forwarded-for']) { | |
return req.headers['x-forwarded-for']; | |
} | |
if (req.connection && req.connection.remoteAddress) { | |
return req.connection.remoteAddress; | |
} | |
if (req.connection.socket && req.connection.socket.remoteAddress) { | |
return req.connection.socket.remoteAddress; | |
} |
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
package com.alkhodiry.mb.rest.filters; | |
import java.io.IOException; | |
import javax.servlet.FilterChain; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import org.apache.commons.logging.Log; |
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
// define a grammar called Hello | |
grammar Hello; | |
r : 'hello' ID; | |
ID : [a-z]+ ; | |
WS : [ \t\r\n]+ -> skip ; |