Skip to content

Instantly share code, notes, and snippets.

View 844196's full-sized avatar

Masaya Takeda 844196

  • ใปใ‚“ใซใ‚ƒใ‚‰็”ฃๆฅญ
  • Sapporo, Japan
  • 09:35 (UTC +09:00)
  • X @efumaxay
View GitHub Profile
@844196
844196 / LWWS.sh
Last active August 29, 2015 14:14
LWWS
#!/bin/bash
IFS=','
location="${1}"
function getWeatherJson() {
curl -s "http://weather.livedoor.com/forecast/webservice/json/v1?city=${1}" \
| jq -r '. | "\(.publicTime),\(.location.city),\(.forecasts[0].telop),\(.forecasts[0].temperature.max.celsius),\(.forecasts[0].image.url)"' \
>~/.weather_${1}.json
}
@844196
844196 / OWMA.sh
Created January 27, 2015 18:25
OpenWeatherMap API
#!/bin/bash
city="${1}"
IFS=','
mkdir -p "/tmp/${0##*/}" \
&& tmpdir="/tmp/${0##*/}" \
&& tmpfile="${tmpdir}/weather_${args}"
function getWeather() {
@844196
844196 / ip.sh
Created January 27, 2015 18:26
#!/bin/bash
inc=$(ifconfig | awk -F':' '!/^lo/ && /^[a-z]/{print $1}')
for i in ${inc[*]}
do
ifconfig "${i}" 2>/dev/null | awk '$1=="inet"{print "โކ "$2}'
done
#!/bin/bash
#
# @(#) ใ‚นใ‚ฏใ‚ทใƒงใ‚’ๆ’ฎๅฝฑใ—ใฆใ‚ฟใ‚คใƒˆใƒซใƒใƒผใจใ‹ใ‚’ใƒˆใƒชใƒŸใƒณใ‚ฐใ—ใฆใใ‚Œใ‚‹ใ‚„ใค
#
# Author:
# 844196 (@84____)
#
# License:
# MIT
#
@844196
844196 / sake
Created February 5, 2015 16:39
       
   
       
     
     
       
       
@844196
844196 / example.markdown
Last active August 29, 2015 14:14
README.md templete (like man page)

BOSHIN

author version license issue

ใ‚นใ‚ฏใ‚ทใƒงใ‚’ๆ’ฎๅฝฑใ—ใฆใ‚ฟใ‚คใƒˆใƒซใƒใƒผใจใ‹ใ‚’ใƒˆใƒชใƒŸใƒณใ‚ฐใ—ใฆใใ‚Œใ‚‹ใ‚„ใค

@844196
844196 / TDEF
Created February 6, 2015 20:37
?
           
           
               
           
           
           
               
             
               
require "formula"
class Clangsay < Formula
homepage "https://github.com/sasairc/clangsay"
url "https://github.com/sasairc/clangsay/archive/v0.0.5.tar.gz"
sha256 "35bd8c0eb61be8b26482b682ddaa4fc51f56bf644222a996bccd74613b1330a3"
version "0.0.5"
option "zsh-completion", "Install zsh completion"
@844196
844196 / boku.bash
Last active August 29, 2015 14:17
ใปใ‚‰ใ€ใ‚ใชใŸใฎใ™ใใชใƒ›ใƒƒใ‚ฑใฒใ‚‰ใใ‚ˆ
#!/bin/bash
#
# @(#) ใปใ‚‰ใ€ใ‚ใชใŸใฎใ™ใใชใƒ›ใƒƒใ‚ฑใฒใ‚‰ใใ‚ˆ
#
P_m="232m"
P_o="196m"
P_t="18m"
P_h="180m";
P_e="m"
@844196
844196 / quodlibet_nowplaying_post.rb
Created April 14, 2015 11:01
quodlibetใงๅ†็”Ÿไธญใฎๆ›ฒใ‚’ๆŠ•็จฟใ™ใ‚‹ใ‚„ใค
Plugin.create :post_nowplaying_quodlibet do
command(:post_nowplaying_quodlibet,
name: 'ๅ†็”Ÿไธญใฎๆ›ฒใ‚’ๆŠ•็จฟใ™ใ‚‹',
condition: lambda{ |opt| true },
visible: true,
role: :postbox) do |opt|
msg = 'โ™ช ' + `quodlibet --print-playing` + '#NowPlaying'
Service.primary.update :message => msg
end
end