View mkgentoousb.sh
#!/bin/sh | |
set -e | |
echo "This is an easy script to create Gentoo/Linux installation usb stick." | |
echo | |
if [ $# -ne 2 ] | |
then | |
echo "usage: $0 /dev/sdx /path/to/gentoo_install_disk.iso" |
View reset_tweet_bgcolor.mdc
#!/home/penguin/mikutter_dbus_console.rb | |
UserConfig[:mumble_basic_font] = 'Sans 10' | |
UserConfig[:mumble_basic_color] = [0, 0, 0] | |
UserConfig[:mumble_reply_font] = 'Sans 8' | |
UserConfig[:mumble_reply_color] = [255*0x66, 255*0x66, 255*0x66] | |
UserConfig[:mumble_basic_left_font] = 'Sans 10' | |
UserConfig[:mumble_basic_left_color] = [0, 0, 0] | |
UserConfig[:mumble_basic_right_font] = 'Sans 10' | |
UserConfig[:mumble_basic_right_color] = [255*0x99, 255*0x99, 255*0x99] |
View scale_resolution.rb
#!/usr/bin/env ruby | |
=begin | |
Copyright (c) 2014 Takuma Nakajima | |
This software is released under the MIT License. | |
http://opensource.org/licenses/mit-license.php | |
=end |
View asetroot.sh
#!/bin/bash | |
# | |
# asetroot.sh | |
# | |
# Copyright (c) 2014 Takuma Nakajima | |
# | |
# This software is released under the MIT License. | |
# http://opensource.org/licenses/mit-license.php | |
# |
View mikutter_haishou.rb
# -*- coding: utf-8 -*- | |
Plugin.create :haishou do | |
filter_gui_postbox_post do |gui_postbox| | |
text = Plugin.create(:gtk).widgetof(gui_postbox).widget_post.buffer.text.gsub(/はい/, "拝承") | |
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 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] |
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_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 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 |
OlderNewer