Skip to content

Instantly share code, notes, and snippets.

View closer27's full-sized avatar

Seungwon Kim closer27

View GitHub Profile
@DazWorrall
DazWorrall / Output
Created February 9, 2012 13:06
Testing file upload handling in Flask
in upload handler
in file close
..
----------------------------------------------------------------------
Ran 2 tests in 0.021s
OK
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active July 26, 2024 10:00
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@benrigas
benrigas / Swift JSON Playground
Last active November 2, 2017 14:51
Swift Playground for initializing objects from Dictionary/JSON
// Playground - noun: a place where people can play
import Cocoa
extension String {
func dictionaryFromJSON () -> Dictionary<String, AnyObject>? {
if let dict = NSJSONSerialization.JSONObjectWithData(self.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: true),
options: .AllowFragments,
error: nil) as? Dictionary<String,AnyObject>
{
@iddm
iddm / install script
Last active March 1, 2023 01:44
Install PyQt5 to Mac OS X Yosemite with python3
This snippet tested on Yosemite 10.10.1
1. Define your python3 directory (for example, "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/")
2. Download "http://download.qt-project.org/official_releases/qt/5.3/5.3.2/qt-opensource-mac-x64-clang-5.3.2.dmg" or any other new version of qt for mac and install it.
3. Download SIP sources here: http://www.riverbankcomputing.com/software/sip/download
4. Download PyQt5-gpl sources here: http://www.riverbankcomputing.com/software/pyqt/download5
5. Go to your downloads by terminal (for example, "cd ~/Downloads")
6. tar xvf PyQt-gpl-5.3.2.tar.gz
7. tar xvf sip-4.16.4.tar.gz
8. cd sip-4.16.4/
@bendrucker
bendrucker / droplr-gh.md
Last active February 1, 2021 12:30
Pasting droplr image/gif links to Github

Droplr will auto-copy the sharing link when you take a screenshot. You'll use this on GitHub.

That copied link will look like this: http://d.pr/i/13PDt

To paste that into a GitHub issue:

![](http://d.pr/i/13PDt+)
@hcn1519
hcn1519 / GradientLayer.md
Last active June 7, 2023 09:33
UITableViewCell with GradientLayer in swift

Create GradientLayer on your tableViewCell(collectionViewCell)

1. Create CAGradientLayer Instance on your tableViewCell

class MyCell: UITableViewCell {
    let gradientLayer = CAGradientLayer()
}