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 / README.md
Last active August 29, 2015 14:03
PulseAudio formula for Mavericks

PulseAudio formula for Mavericks

Usage

  • $ sudo cp pulseaudio.rb /usr/local/Library/Formula/pulseaudio.rb
  • $ brew install pulseaudio
@aycabta
aycabta / MathJax.html
Last active August 29, 2015 14:02
Very Simple MathJax Page
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>simple MathJax</title>
<script type="text/x-mathjax-config;executed=true">
MathJax.Hub.Config({
tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] }
});
@aycabta
aycabta / fgh3tex.rb
Last active August 29, 2015 14:02
Transcribes FGH f_3(n) to TeX
def oh_great(n)
if n == 1
"2^n n"
else
prev = oh_great(n - 1)
"2^{#{prev}} {#{prev}}"
end
end
def output(n)
@pinzolo
pinzolo / coveralls_filter_1.rb
Created November 29, 2013 00:58
Coveralls でカバレッジ集計対象のファイルを制限する方法 https://coveralls.io/docs/ruby を参照
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start do
# スペックファイルを除外
add_filter "/spec/"
end
@tompave
tompave / simple_redirect_server.rb
Last active December 21, 2015 07:59
A simple ruby HTTP server that listens on 127.0.0.1:80 and redirects all requests to a specific URL.
#! /usr/bin/env ruby
require 'webrick'
require 'uri'
TARGET_URL = URI.parse "http://tommaso.pavese.me/back_to_work/"
redirect_callback = Proc.new do |request, response|
response.set_redirect WEBrick::HTTPStatus::TemporaryRedirect, TARGET_URL
#! /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
@yuiseki
yuiseki / cpufreqd.conf
Created July 20, 2013 18:39
/etc/cpufreqd.conf
# this is a comment
# see CPUFREQD.CONF(5) manpage for a complete reference
#
# Note: ondemand/conservative Profiles are disabled because
# they are not available on many platforms.
[General]
pidfile=/var/run/cpufreqd.pid
poll_interval=2
verbosity=4
@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;
@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
@esehara
esehara / setogiwa_match.txt
Last active December 16, 2015 14:39
瀬戸際のマーチさん
瀬戸際に漂う 神秘のソース
このライブラリの果ては まあるく結合してますよ
瀬戸際で語らう リリースの形
七つのチケットはブロッカーを出してる
仕様ー!どこだー!
仕様ー!どこだー!