Skip to content

Instantly share code, notes, and snippets.

View aycabta's full-sized avatar
💭
🏴‍☠️

aycabta aycabta

💭
🏴‍☠️
  • Space Pirates, LLC.
View GitHub Profile
@aycabta
aycabta / footer
Last active December 16, 2015 19:00
zinruisaimetsubou scraper
@aycabta
aycabta / skype.sh
Created May 29, 2013 04:11
It's so benry to run Skype on Linux.
#!/bin/sh
tmux new-session -d -s skype -n run
tmux send-keys -t skype:run "export XMODIFIERS=\"@im=ibus\"" C-m
tmux send-keys -t skype:run "export GTK_IM_MODULE=ibus" C-m
tmux send-keys -t skype:run "export QT_IM_MODULE=ibus" C-m
tmux send-keys -t skype:run "/usr/bin/skype &" C-m
@aycabta
aycabta / kusort.c
Last active December 19, 2015 04:59
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
extern void bitsort_recursive(unsigned int *old_seq, unsigned int *new_seq, size_t size, size_t maxbit);
void bitsort_recursive(unsigned int *old_seq, unsigned int *new_seq, size_t size, size_t maxbit)
{
int i;
size_t l_pos;
#! /bin/bash
for i in *.a;
do
RESULT=`nm $i 2> /dev/null | grep $1 2> /dev/null`
if [ -n "$RESULT" ]; then
echo $i
echo $RESULT
echo
fi
message_regexp = /\.cpp:\d+\)$/
have_first_hit_come = false
shit_positions = {}
while line = gets
if line =~ /^==\d+==/
(header, message) = line.split(/ +/, 2).map { |s| s.chomp! }
if message.nil? or message.empty?
have_first_hit_come = false
@aycabta
aycabta / moge.rb
Last active December 21, 2015 20:39 — forked from supermomonga/moge.rb
require 'rspec'
def cloop(*params, &block)
r = ->(*xs){ block.(r, *xs) }
r.(*params)
end
def map(xs, &block)
cloop([], xs){ |r, nxs, x|
if x == []
@aycabta
aycabta / faces_on_google_the_fucker.user.js
Last active December 23, 2015 05:49
Faces on Google The Fucker
// ==UserScript==
// @name Faces on Google The Fucker
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @include /https?:\/\/www.google\.[^\/]+\/search.+/
// @copyright 2012+, You
// ==/UserScript==
(function() {
def retrieve_write_queries(filename)
queries = []
now_query = ""
open(filename) do |f|
add_query = lambda {
if $1 == "Query"
if not now_query.empty?
#puts now_query.split.first
queries << now_query
end
@aycabta
aycabta / log
Created October 27, 2013 08:21
VAC HEAD request test
301: http://www.kaoriya.net/blog/2012/12/02 moves to http://www.kaoriya.net/blog/2012/12/02/
301: http://qiita.com/items/415a30930a80b9b42adb moves to http://qiita.com/kefir_/items/415a30930a80b9b42adb
301: http://d.hatena.ne.jp/deris/20121209/1355048075 moves to http://deris.hatenablog.jp/entry/20121209/1355048075
Domain Not Found: http://blog.wflow.jp/posts/20121216-tips-vim-outliner/
Domain Not Found: http://blog.wflow.jp/posts/20121216-tips-vim-outliner/
301: http://d.hatena.ne.jp/kanno_kanno/20121217/1355694191 moves to http://kannokanno.hatenablog.com/entry/20121217/1355694191
301: http://fukayatsu.github.com/2013/01/02/vim-advent-calendar/ moves to http://blog.fukayatsu.com/2013/01/02/vim-advent-calendar/
301: http://d.hatena.ne.jp/basyura/20130106/p1 moves to http://basyura.hateblo.jp/entry/20130106/p1
301: http://d.hatena.ne.jp/cohama/20130108/1357664352 moves to http://cohama.hateblo.jp/entry/20130108/1357664352
301: http://qiita.com/items/a5ead41d4a1d4cbaeb74 moves to http://qiita.com/rbtnn/items/a
# start the ssh-agent
function start_agent {
echo "Initializing new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo "succeeded"
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
/usr/bin/ssh-add ~/.ssh/bitbucket
/usr/bin/ssh-add ~/.ssh/github
}