Skip to content

Instantly share code, notes, and snippets.

You-wei Teng youweit

Block or report user

Report or block youweit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@davidyen1124
davidyen1124 / get_page_likes.py
Last active Dec 25, 2015
Get the likes of any facebook pages.
View get_page_likes.py
#!/usr/bin/python
# Get the likes of any facebook pages.
#
# You have to install https://github.com/pythonforfacebook/facebook-sdk first.
# Then go to Facebook Graph API Explorer, and copy the Access Token.
import facebook
import sys
@davidyen1124
davidyen1124 / wifly.py
Last active Dec 20, 2015
Get WiFly API, and use "pygmaps" to show all the hotspot in Google Maps.
View wifly.py
#!/usr/bin/python
# -*- encoding: utf-8 -*-
import urllib2
import json
import pygmaps
url = 'http://60.199.253.136/api/action/datastore_search?resource_id=d7a1b4c2-cad0-44f2-958a-a9d7a9330c95&limit=100000'
@davidyen1124
davidyen1124 / resize.py
Created Jul 13, 2013
Resize the images with SIPS in Mac OS X. Usage: python resize.py <height> <width> <path to the directory>
View resize.py
#!/usr/bin/python
import os
import sys
import commands
def getHeightWidth(file):
widthstr = commands.getstatusoutput('sips -g pixelWidth {0}'.format(file))[1]
heightstr = commands.getstatusoutput('sips -g pixelHeight {0}'.format(file))[1]
@evadne
evadne / gist:4544569
Last active Apr 22, 2019
Todd Laney’s enhancements to Sticky Headers + UICollectionViewFlowLayout
View gist:4544569
//
// StickyHeaderLayout.h
// Wombat
//
// Created by Todd Laney on 1/9/13.
// Copyright (c) 2013 ToddLa. All rights reserved.
//
// Modified from http://blog.radi.ws/post/32905838158/sticky-headers-for-uicollectionview-using THANKS!
//
@lotem
lotem / default.custom.yaml
Last active Jul 30, 2019
在Rime輸入方案選單中添加五筆、雙拼、粵拼、注音,保留你需要的
View default.custom.yaml
# default.custom.yaml
# save it to:
# ~/.config/ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
patch:
schema_list:
- schema: luna_pinyin # 朙月拼音
- schema: luna_pinyin_simp # 朙月拼音 简化字模式
View AndroidManifext.xml
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
You can’t perform that action at this time.