Skip to content

Instantly share code, notes, and snippets.

View hdemon's full-sized avatar

Masami Yonehara hdemon

  • LINE
  • Fukuoka, Japan
  • 10:23 (UTC +09:00)
View GitHub Profile
# デフォルトエディタをvimに変更
sudo update-alternatives --set editor $(update-alternatives --list editor | grep 'vim.basic')
# パッケージリポジトリを日本ミラーサーバーに変更
sudo sed -i'~' -E "s@http://(..\.)?(archive|security)\.ubuntu\.com/ubuntu@http://ftp.jaist.ac.jp/pub/Linux/ubuntu@g" /etc/apt/sources.list
# よく使うパッケージをインストール
sudo apt-get -y update
sudo apt-get -y install software-properties-common
sudo add-apt-repository -y ppa:git-core/ppa
### Sample Settings
map i <NOP>
map o <NOP>
map j <NOP>
map ; <NOP>
map t <NOP>
pagecmd * nmap l :TabFocusNext
pagecmd * nmap h :TabFocusPrev
a = document.createElement("script");
a.setAttribute("src", "https://code.jquery.com/jquery-2.1.3.min.js");
document.querySelector("body").appendChild(a);
array = jQuery(".sc-button-like").toArray();
function click() {
setTimeout(function() {
console.log(array.pop());
if (array.length > 0) {
b.pop().click();
/*
* Classic example grammar, which recognizes simple arithmetic expressions like
* "2*(3+4)". The parser generated from this grammar then computes their value.
*/
start
= right:digits " plus " left:digits {
return right + left;
}
?member-name? - ?title? (?illust-id?) ?page??[ページ]?
function testZoomProperty() {
var cssString = 'zoom: 1;';
var elem = document.createElement('div');
elem.style.cssText = cssString;
return elem.style.cssText === cssString;
}
@hdemon
hdemon / yui.md
Last active August 29, 2015 14:11

3Dで唯ちゃん作ろうと思ったけど間に合わなかった。すみません。25日までに進捗あったら更新します。

uncaught exception: Undefined index: tutorial_id (errno: 8) in /var/log/p12501/smarty/3c9fdce5ac63683ecd7c939652426522^c197b8c57dcdfaba6b94e214615592a9b029a472.file.list.tpl.php at line #222Undefined index: tutorial_id
in file: /var/log/p12501/smarty/3c9fdce5ac63683ecd7c939652426522^c197b8c57dcdfaba6b94e214615592a9b029a472.file.list.tpl.php line 222
#0 /var/log/p12501/smarty/3c9fdce5ac63683ecd7c939652426522^c197b8c57dcdfaba6b94e214615592a9b029a472.file.list.tpl.php(222): _hx_error_handler(8, 'Undefined index...', '/var/log/p12501...', 222, Array)
#1 /home/z-masami-yonehara/xgree/ffr/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(180): content_54324a19336be6_12827079(Object(Smarty_Internal_Template))
#2 /home/z-masami-yonehara/xgree/ffr/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('dungeon/support...', NULL, NULL, NULL, true)
#3 /home/z-masami-yonehara/xgree/ffr/frontend/ffr/app/FFR_Renderer_Smarty3.php(36): Smarty_Inter
require "json"
require "selenium-webdriver"
require "rspec"
require 'appium_lib'
include RSpec::Expectations
def desired_caps
{
caps: {
@hdemon
hdemon / gist:531f89c34fda0686205d
Last active August 29, 2015 14:05
binary_heap.coffee
class BinaryHeap
constructor: ->
@array = []
@rootIndex = 1
insert: (element) ->
@array.push element
@percolateUp @lastLeafIndex()
deleteMaximum: ->