Skip to content

Instantly share code, notes, and snippets.

View papersail's full-sized avatar

Jiang Guo papersail

  • Toronto, Canada
View GitHub Profile
@papersail
papersail / goToSail.py
Last active May 17, 2022 13:17
Python3 Script to Grab Wind Speed
# Need to install pyowm by executing
# pip3 install pyowm
# create a free account at https://openweathermap.org and grab your API Key
from pyowm.owm import OWM
from pyowm.utils import measurables
APIKEY='YourAPIKeyFromOpenWeatherMap' #your API Key here as string
owm = OWM(APIKEY)
mgr = owm.weather_manager()
@papersail
papersail / gist:a9c8be9ddc04f6b8e7cb
Last active August 29, 2015 14:13
Linux Desktop Tips
# find all the files that of size bigger than 10M and sort output by size
find / -type f -size +10024k -exec ls -lhS {} \; 2>/dev/null | sort -r -h -k5 | head -n 30
# List files/folders by human-friendly format
du -sh * | sort -hr | less

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

@papersail
papersail / Lex.fsl
Created April 8, 2011 01:39
mfcalc (translated from Ocaml to F#)
{
module Lexer
open System
open Parser
open Microsoft.FSharp.Text.Lexing
let lexeme = LexBuffer<_>.LexemeString
let func_table = [