Skip to content

Instantly share code, notes, and snippets.

View aki017's full-sized avatar
:shipit:
RETIRED

Akiteru Maeda aki017

:shipit:
RETIRED
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
typedef struct LIST{
struct LIST *next;
struct LIST *prev;
char *str;
}List;
void help();
@aki017
aki017 / gist:4204643
Created December 4, 2012 14:42
一括で複数ホストにするやつ
#!/bin/bash
tmux start-server
tmux new-session -d -n tmux-ssh-window -s tmux-ssh
for i in ここにスペース区切りでホストを並べる
do
tmux split-window -h -t tmux-ssh-window
tmux send-keys "ssh $i" C-m
tmux select-layout -t tmux-ssh-window main-horizontal
@aki017
aki017 / dm.pl
Created December 10, 2012 22:34
DMでつぶやく奴
#! /usr/local/bin/perl
use Net::Twitter;
use strict;
use warnings;
use YAML;
use utf8;
my $setting = YAML::LoadFile("config.yaml");
my $consumer_key = $setting->{"c"};
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
android:installLocation="preferExternal"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
@aki017
aki017 / gist:4967846
Created February 16, 2013 17:37
ふりっつ氏
There is no end though there is a start in space. --- Infinity.
宇宙に始まりはあるが、終わりはない。 ――― 無限
It has own power, it ruins, and it goes though there is a start also in the star. --- Finite.
星にもまた始まりはあるが、自らの力を持って滅びゆく。 ――― 有限
Only the person who was wisdom can read the most foolish one from the history.
英知を持つ者こそ、もっとも愚かであることが、歴史からも読み取れる。
The fish that lives in the sea dosen't know the world in the land. It also ruins and goes if they have wisdom.
@aki017
aki017 / gist:5012132
Created February 22, 2013 09:42
dont work
module A
def B
p "48"
end
module K
B
end
end
@aki017
aki017 / gist:5110217
Last active December 14, 2015 15:48
寿司
#! /usr/bin/env ruby
# -*- coding: utf-8 -*-
require "SocketIO"
client = SocketIO.connect("http://54.249.246.187:3000") do
before_start do
on_event('message'){ |data|
puts "%20s%5.1f|%d(%d)" % [ ("*"*(data[0]["value"]/5)).ljust(40) , data[0]["value"], data[0]["watcher"] , data[0]["count"]||0]
}
end
Fri Apr 26 07:38:16 2013
panic(cpu 0 caller 0xffffff800b8156b0): "Spinlock acquisition timed out: lock=0xffffff80226807b8, lock owner thread=0xffffff801ff1baa0, current_thread: 0xffffff801ff1baa0, lock owner active on CPU 0x0, current owner: 0xffffff801ff1baa0"@/SourceCache/xnu/xnu-2050.22.13/osfmk/i386/locks_i386.c:363
Backtrace (CPU 0), Frame : Return Address
0xffffff811754bce0 : 0xffffff800b81d626
0xffffff811754bd50 : 0xffffff800b8156b0
0xffffff811754bd70 : 0xffffff800b820b80
0xffffff811754bda0 : 0xffffff800b810448
0xffffff811754bdf0 : 0xffffff800b820df2
0xffffff811754be20 : 0xffffff800b84f0c1
0xffffff811754be60 : 0xffffff800b816d00
@aki017
aki017 / lvup.js
Created May 3, 2013 00:51
多分これが一番早いと思います
// spidermonkey
abs = function (x){ return (x ^ (x >> 31)) - (x >> 31);}
repeat = function (s,n){ return new Array(++n).join(s);}
var w = 20
for(var i = 0;i<=100;i+=2)
{
for(var j = 0;j<w*2;++j)
{
print("呉x"+i);
var a = repeat(" ",abs(j-w));
@aki017
aki017 / gist:5722202
Created June 6, 2013 15:04
スクフェスのroot端末と判定される条件
以下のディレクトリにsuバイナリ
/data/local
/data/local/bin
/data/local/xbin
/sbin
/system/bin
/system/sd/xbin
/system/xbin
/system/bin/failsafe
/vendor/bin