This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PART I tags to remove | |
| <script ></script> | |
| <script /> | |
| <link > | |
| <style></style> | |
| <style /> | |
| PART II tags to extract | |
| ########## text ############### | |
| 1. text without tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - Javascript: | |
| Photo Scroller: http://www.jssor.com/ | |
| - CSS | |
| http://www.css3maker.com/ | |
| http://cssanimate.com/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [[NSNotificationCenter defaultCenter] addObserver:self | |
| selector:@selector(keyboardFrameWillChange:) | |
| name:UIKeyboardWillShowNotification | |
| object:nil]; | |
| [[NSNotificationCenter defaultCenter] addObserver:self | |
| selector:@selector(keyboardFrameWillChange:) | |
| name:UIKeyboardWillChangeFrameNotification | |
| object:nil]; | |
| [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) | |
| name:UIKeyboardWillHideNotification |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| View Layout | |
| * Layer 1: Underlying view which will be taken snapshot | |
| * Layer 2: FXBlurView and a mask view | |
| * Layer 3: Content view | |
| Example: | |
| + view (Root View Controller) | |
| - FXBlurView (glass effect view) | |
| - mask view (translucent view : usally black with alpha) | |
| - content view |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSString *currentSSID = @""; | |
| CFArrayRef myArray = CNCopySupportedInterfaces(); | |
| if (myArray != nil){ | |
| NSDictionary* myDict = (__bridge NSDictionary *) CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(myArray, 0)); | |
| if (myDict!=nil){ | |
| currentSSID=[myDict valueForKey:@"SSID"]; | |
| } else { | |
| currentSSID=@"<<NONE>>"; | |
| } | |
| } else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| For iOS beginers: | |
| * Objective C | |
| * iOS Framework : UIKit, CoreGraphic ... | |
| * apple sample code | |
| Resources: | |
| * http://objc.io | |
| * Apple WWDC videos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| import sublime, sublime_plugin | |
| import json | |
| class JsonpropCommand(sublime_plugin.TextCommand): | |
| """ | |
| Test 1: | |
| {"a" : "abc", "b" : 1} | |
| Test 2: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface TopBarViewController () | |
| @property (nonatomic, strong) UIView *statusbarBgView; | |
| @end | |
| @implementation TopBarViewController | |
| - (void)viewDidLoad | |
| { | |
| [super viewDidLoad]; | |
| // Do any additional setup after loading the view. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <CoreFoundation/CoreFoundation.h> | |
| #import <Foundation/Foundation.h> | |
| NSString *NSStringFromOSStatus(OSStatus errCode) | |
| { | |
| if (errCode == noErr) | |
| return @"noErr"; | |
| char message[5] = {0}; | |
| *(UInt32*) message = CFSwapInt32HostToBig(errCode); | |
| return [NSString stringWithCString:message encoding:NSASCIIStringEncoding]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1) nc & curl to view http request | |
| $ nc -l localhost 8000 & | |
| $ curl --proxy localhost:8000 --silent --max-time 1 http://baidu.com |