Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🏴‍☠️

aycabta aycabta

💭
🏴‍☠️
  • Space Pirates, LLC.
View GitHub Profile
@aycabta
aycabta / README.md
Last active Aug 29, 2015
PulseAudio formula for Mavericks
View README.md

PulseAudio formula for Mavericks

Usage

  • $ sudo cp pulseaudio.rb /usr/local/Library/Formula/pulseaudio.rb
  • $ brew install pulseaudio
@aycabta
aycabta / MathJax.html
Last active Aug 29, 2015
Very Simple MathJax Page
View MathJax.html
<!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 Aug 29, 2015
Transcribes FGH f_3(n) to TeX
View fgh3tex.rb
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 Nov 29, 2013
Coveralls でカバレッジ集計対象のファイルを制限する方法 https://coveralls.io/docs/ruby を参照
View coveralls_filter_1.rb
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start do
# スペックファイルを除外
add_filter "/spec/"
end
@tompave
tompave / simple_redirect_server.rb
Last active Dec 21, 2015
A simple ruby HTTP server that listens on 127.0.0.1:80 and redirects all requests to a specific URL.
View simple_redirect_server.rb
#! /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
View search_symbol.sh
#! /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 Jul 20, 2013
/etc/cpufreqd.conf
View 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
View kusort.c
#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
It's so benry to run Skype on Linux.
View skype.sh
#!/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 Dec 16, 2015
瀬戸際のマーチさん
View setogiwa_match.txt
瀬戸際に漂う 神秘のソース
このライブラリの果ては まあるく結合してますよ
瀬戸際で語らう リリースの形
七つのチケットはブロッカーを出してる
仕様ー!どこだー!
仕様ー!どこだー!