Skip to content

Instantly share code, notes, and snippets.

View soramugi's full-sized avatar
🦭
I always want to lie down

Y.Tsuyuzaki soramugi

🦭
I always want to lie down
View GitHub Profile
$ sudo sh -c "wpa_passphrase ssid passphrase >> /etc/wpa_supplicant/wpa_supplicant.conf"
$ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="ssid"
#psk="passphrase"
psk=2b1d17284c5410ee5eaae7151290e9744af2182b0eb8af20dd4ebb415928f726
}
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
2 5 * * * galileo >> /home/pi/galileo.log 2>&1
54 4 1 * * rm /home/pi/galileo.log
2015-01-18 16:33:04,817:ERROR: Hit some 'Not Implemented Error': 'is_kernel_driver_active', moving on ...
2015-01-18 16:33:04,826:CRITICAL: # A serious error happened, which is probably due to a
2015-01-18 16:33:04,829:CRITICAL: # programming error. Please open a new issue with the following
2015-01-18 16:33:04,832:CRITICAL: # information on the galileo bug tracker:
2015-01-18 16:33:04,834:CRITICAL: # https://bitbucket.org/benallard/galileo/issues/new
2015-01-18 16:33:04,857:CRITICAL: # /usr/local/bin/galileo: 0.5dev
# Python: 2.7.3 (default, Mar 18 2014, 05:13:23) [GCC 4.6.3]
# Platform: Linux owl 3.12.35+ #730 PREEMPT Fri Dec 19 18:31:24 GMT 2014 armv6l
# pyusb: 1.0.0b2
# requests: 2.5.1
# A serious error happened, which is probably due to a
# programming error. Please open a new issue with the following
# information on the galileo bug tracker:
# https://bitbucket.org/benallard/galileo/issues/new
# /usr/local/bin/galileo: 0.4.3
# Python: 2.7.3 (default, Mar 18 2014, 05:13:23) [GCC 4.6.3]
# Platform: Linux owl 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l
# pyusb: < 1.0.0b1
# requests: 2.5.1
# yaml: own version
SUBSYSTEM=="usb", ATTR{idVendor}=="2687", ATTR{idProduct}=="fb01", SYMLINK+="fitbit", MODE="0666"
function! s:linktotag()
let tag = system("curl -s -F 'link=" . g:linktotag_link . "' https://linktotag.herokuapp.com")
execute ':normal! a ' . tag
call setpos('.', getpos('.'))
endfunction
command! -nargs=? Linktotag :call s:linktotag()
@soramugi
soramugi / mqtt-to-radiko.rb
Last active August 29, 2015 14:17
mqtt経由でコマンドのバックグラウンド実行、プロセスの削除も
require 'mqtt'
require 'uri'
require 'dotenv'
Dotenv.load
topic = ENV['MQTT_TOPIC'] || '#'
uri = URI.parse(ENV['CLOUDMQTT_URL'] || 'mqtt://localhost:1883')
conn_opts = {
remote_host: uri.host,
@soramugi
soramugi / reference.rb
Created April 12, 2015 16:08
参照元URL表示
#!/usr/bin/env ruby
# coding : utf-8
# api試すページ
# https://ga-dev-tools.appspot.com/query-explorer/
require 'pp'
require 'json'
require 'google/api_client'
[[plugins]]
repository = 'Shougo/vimproc.vim'
[plugins.build]
windows = 'tools\\update-dll-mingw'
cygwin = 'make -f make_cygwin.mak'
mac = 'make -f make_mac.mak'
unix = 'make -f make_unix.mak'
# format
[[plugins]]
@soramugi
soramugi / retweet_follow.rb
Last active August 29, 2015 14:21
リツイートされたらフォロー
require 'twitter'
client = Twitter::REST::Client.new do |config|
config.consumer_key = ENV['consumer_key']
config.consumer_secret = ENV['consumer_secret']
config.access_token = ENV['access_token']
config.access_token_secret = ENV['access_token_secret']
end
users = []