Skip to content

Instantly share code, notes, and snippets.

View pokk's full-sized avatar
🌀

Jieyi pokk

🌀
View GitHub Profile
@pokk
pokk / README.md
Last active April 5, 2017 02:15
In python align the string

Introduction

If you don't feel '\t' is convenient, you could customize the free space how many you want.

Talk is cheap. Show me the code.

# Align right
s = 'test'.rjust(10)
# >>> "test "
@pokk
pokk / README.md
Created October 29, 2016 03:16
create a gif animation in iOS

Introduction

Create a gif animation in iOS.

@pokk
pokk / README.md
Created October 28, 2016 15:03
create a dialog fragment in iOS Xamarin

Introduction

Create a simple dialog toast in iOS by Xamarin.

@pokk
pokk / README.md
Last active April 5, 2017 02:16
effective heapq

Introduction

If you want to use the min() or max() function in python. There is that an alternative way of the speedy method is headq.

benifits

The time complexity for finding a max value and a min value is O(logn).
Time complexity of min() and max() are O(n).

Talk is cheap. Show me the code.

@pokk
pokk / README.md
Last active October 26, 2016 12:16
Introduce simple way to use them
@pokk
pokk / XCode plugins' and preferences' path.md
Created October 25, 2016 06:30
XCode plugins' and preferences' path

Introduction

preferences path

~/Library/Developer/UserData/

plugin path

@pokk
pokk / README.md
Created October 25, 2016 06:12
Create a service running on background mode.

Intrduction

Keep a service running on background mode in iOS.

@pokk
pokk / README.md
Last active January 11, 2017 06:13
How to pick photos from build-in photos.
@pokk
pokk / README.md
Last active October 21, 2016 07:56
send pictures to php server by Alamofire library

Introduction

Send a media file to php server from swift.

@pokk
pokk / README.md
Last active April 5, 2017 02:09
add requirements external library in new envrionment

Introduction

Add necessary requirement of external libraries in your Python project automatically by one instruction.

You can put your necessary libraries as like requirements.txt.

How to use

Open to your project directory then put as below: