View 60_warnning.zsh
#!/usr/bin/env zsh | |
function arp { | |
echo "use 'ip n' instead." | |
return 1 | |
} | |
function ifconfig { | |
echo "use 'ip a (ip addr)', 'ip link', or 'ip -s (ip -stats)' instead." | |
return 1 |
View mikutter_yo.rb
# -*- coding: utf-8 -*- | |
Plugin.create :mikutter_yo do | |
filter_gui_postbox_post do |gui_postbox| | |
text = Plugin.create(:gtk).widgetof(gui_postbox).widget_post.buffer.text.gsub(/よ/, "Yo") | |
Service.primary.post :message => text | |
Plugin.call(:before_postbox_post, text) | |
Plugin.create(:gtk).widgetof(gui_postbox).widget_post.buffer.text = '' | |
Plugin.filter_cancel! |
View mba_autobl.rb
#!/home/penguin/local/ruby/bin/ruby | |
# | |
# Copyright (c) 2014 Takuma Nakajima | |
# | |
# This software is released under the MIT License. | |
# http://opensource.org/licenses/mit-license.php | |
# | |
# ambient light sensor | |
ALS_SOURCE = '/sys/devices/platform/applesmc.768/light' |
View 50-mtrack.conf
Section "InputClass" | |
Identifier "touchpad catchall" | |
Driver "mtrack" | |
MatchIsTouchpad "on" | |
EndSection | |
Section "InputClass" | |
# available options: https://github.com/BlueDragonX/xf86-input-mtrack | |
Identifier "Multitouch driver settings" | |
MatchProduct "Apple|bcm5974" |
View autoinstall_mikutter_ubuntu1404.sh
#!/bin/bash | |
# This script will install mikutter 3.0.0 (currently testing release) | |
# to your fresh Ubuntu 14.04 environment (tested on Server LTS amd64 via ssh -YC) | |
# install depends | |
sudo apt-get update | |
sudo apt-get install ruby2.0 ruby2.0-dev git libgtk2.0-dev fonts-vlgothic | |
# checkout latest mikutter branch |
View hello.sh
This file has been truncated, but you can view the full file.
#!/bin/bash | |
perl -e 'while (<>) { print pack("H*",$_); }' <<EOF > hello |
View hello.sh
#!/bin/bash | |
cat <<EOF > hello.c | |
#include <stdio.h> | |
int main(void) { | |
printf("Hello, world!\n"); | |
return 0; | |
} | |
EOF | |
gcc -o hello hello.c |
View mikutter_fav_all_accounts.rb
# -*- coding: utf-8 -*- | |
Plugin.create :fav_all_accounts do | |
proc = Plugin.filtering(:command, Hash.new).first[:account_forward][:exec] | |
command(:fav_all_accounts, | |
name: '全部のアカウントでふぁぼる', | |
condition: lambda{ |opt| true }, | |
visible: true, | |
role: :timeline) do |opt| |
View mselect.rb
#!/usr/bin/env ruby | |
FLOATING_PATH = File.join(ENV["HOME"], ".mikutter") | |
FLOATING_PATH_DIR = File.dirname(FLOATING_PATH) | |
FLOATING_PATH_BASE = File.basename(FLOATING_PATH) | |
if File.exists? FLOATING_PATH and not File.symlink? FLOATING_PATH | |
puts "error: #{FLOATING_PATH} exists but not a symlink" | |
exit 1 | |
end |
View mikutter_shrink_words.rb
# -*- coding: utf-8 -*- | |
Plugin.create :shrink_words do | |
def shrink_words(src) | |
str = src | |
src.scan(/[a-zA-Z_]+/).map{ |s| | |
if s.size > 3 | |
[s, s[0] + (s.size - 2).to_s + s[-1]] | |
else | |
[s, s] |