Skip to content

Instantly share code, notes, and snippets.

View skyline75489's full-sized avatar

Chester Liu skyline75489

View GitHub Profile
@skyline75489
skyline75489 / why-shut-down.sh
Created January 5, 2016 11:51
Macbook Shutdown reason
syslog -k Sender kernel -k Message CSeq 'n Cause: -' | tail | awk '/:/{$4=""; print}' | pbcopy
@skyline75489
skyline75489 / FLAnimatedImage+YYCache.m
Last active November 30, 2015 01:50
FLAnimatedImage+YYCache
//
// FLAnimatedImageView+YYCache.m
// Gif-Example
//
// Created by skyline on 15/11/21.
// Copyright © 2015年 skyline. All rights reserved.
//
#import "FLAnimatedImageView+YYCache.h"
#import "SDWebImageDownloader.h"
@skyline75489
skyline75489 / my_range.py
Last active August 8, 2016 10:49
implement range in python, to mimic the builtin range
def my_range(start, stop=None, step=None):
result = []
begin = 0
end = 0
_step = 1
if stop is None:
end = start
else:
begin = start
end = stop