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
| // 普通のバブルソート | |
| // 大小関係を比較し、スワップする。 | |
| #include <stdio.h> | |
| #define LEN (6) | |
| int swap(int *x, int *y){ | |
| int c; | |
| c = *x; | |
| *x = *y; |
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 [ "${1}" = "" ];then | |
| echo "usage: ${0##*/} source" | |
| exit 0 | |
| fi | |
| if [ "$(echo ${1} | grep ".markdown$")" == "" ];then | |
| echo "${0##*/}: error: unsupported filetype. source file should be markdown format." | |
| exit 1 | |
| fi |
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
| javascript:if(document.URL.match(/http:\/\/.*\.pixiv\.net\/img\d+\/img\/.*\//)!=null){document.location="http://www.pixiv.net/member_illust.php?mode=medium&illust_id="+document.URL.replace(RegExp.lastMatch,"").match(/\d+/)} |
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
| There was an error while trying to write to Gemfile.lock. It is likely that | |
| you need to allow write permissions for the file at path: | |
| /opt/mikutter/Gemfile.lock | |
| /opt/mikutter/core/mui/cairo_cell_renderer_message.rb: line 10 | |
| GLib-GObject-WARNING **:Attempt to add property GtkCellRendererMessage::message-id after class was initialised | |
| error: /opt/mikutter/core/plugin/list/list.rb:275:in `rescue in block (3 levels) in <top (required)>': list redume failed | |
| error: /opt/mikutter/core/plugin/list/list.rb:276:in `rescue in block (3 levels) in <top (required)>': undefined method `[]' for nil:NilClass | |
| from /opt/mikutter/core/plugin/list/list.rb:269:in `block (3 levels) in <top (required)>' | |
| from /opt/mikutter/core/plugin/list/list.rb:265:in `each' | |
| from /opt/mikutter/core/plugin/list/list.rb:265:in `block (2 levels) in <top (required)>' |
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
| ####### | |
| # Git-sandbox | |
| # create sandbox branch easily | |
| # | |
| # Please add below lines to your .gitconfig: | |
| [alias] | |
| sandbox = ! (git config sandbox.originBranch >> /dev/null || ! echo 'error: please set origin branch for sandbox\n (\"git config --local sandbox.originBranch <branchname>\")') && (git checkout sandbox || git checkout -b sandbox $(git config sandbox.originBranch)) | |
| sandbox-reset = ! git sandbox && git reset --hard $(git config sandbox.originBranch) |
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 | |
| # git prune-localとかいうの作りたかった | |
| # 標準入力に,リポジトリのリストを渡すと消える | |
| for branch in $(awk '{ print $3 }' < /dev/stdin | sed 's/^origin\///g');do git branch -D $branch;done |
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 Kancollet UserScript | |
| // @version 0.12.5 | |
| // @author Shusui Moyatani | |
| // @namespace https://gist.github.com/syusui-s/8703407 | |
| // @description Kancolletを自動起動する | |
| // @icon http://syusui-s.github.io/kancollet/images/icon.png | |
| // @match http://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854* | |
| // @match https://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854* | |
| // @updateURL https://gist.github.com/syusui-s/8703407/raw/kancollet_autoloader.user.js |
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
| " 括弧補完 | |
| inoremap { {}<LEFT> | |
| inoremap [ []<LEFT> | |
| inoremap ( ()<LEFT> | |
| inoremap " ""<LEFT> | |
| inoremap ' ''<LEFT> | |
| vnoremap { "zdi^V{<C-R>z}<ESC> | |
| vnoremap [ "zdi^V[<C-R>z]<ESC> | |
| vnoremap ( "zdi^V(<C-R>z)<ESC> | |
| vnoremap " "zdi^V"<C-R>z^V"<ESC> |
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 Google Image Tab Before Style | |
| // @namespace GoogleImgTabBeforeStyle | |
| // @description Googleの画像タブの位置を以前の位置へ移動する | |
| // @include /^https:\/\/.*google\..*\/.*&q=.*$/ | |
| // ==/UserScript== | |
| function imgNode(nodes) { | |
| for (var i = 0; i < nodes.length; ++i) { | |
| if (nodes[i].innerText == '画像') return nodes[i]; |
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
| javascript:function imgNode(nodes){ for(var i = 0; i < nodes.length; ++i){ if(nodes[i].innerText == '画像') return nodes[i]; } return false; } node = imgNode(document.getElementsByClassName('hdtb_mitem')); menu = document.getElementById('hdtb_msb'); menu.removeChild(node); menu.insertBefore(node, menu.childNodes[1]); |