This file contains 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
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 | |
Type "copyright", "credits" or "license()" for more information. | |
>>> a = u'\xb2\xe2\xca\xd4' | |
>>> b = a.encode('raw_unicode_escape') | |
>>> print b | |
测试 | |
>>> c = a.encode('latin1') | |
>>> print c | |
测试 |
This file contains 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
+(BOOL)isJailbroken{ | |
#if !(TARGET_IPHONE_SIMULATOR) | |
if ([[NSFileManager defaultManager] fileExistsAtPath:@"/Applications/Cydia.app"]){ | |
return YES; | |
}else if([[NSFileManager defaultManager] fileExistsAtPath:@"/Library/MobileSubstrate/MobileSubstrate.dylib"]){ | |
return YES; | |
}else if([[NSFileManager defaultManager] fileExistsAtPath:@"/bin/bash"]){ | |
return YES; | |
}else if([[NSFileManager defaultManager] fileExistsAtPath:@"/usr/sbin/sshd"]){ | |
return YES; |
This file contains 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
.directive('prettyp', function(){ | |
return function(scope, element, attrs) { | |
$("[rel^='prettyPhoto']").prettyPhoto({deeplinking: false, social_tools: false}); | |
} | |
}) |
This file contains 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
myApp.directive('markdown', function () { | |
var converter = new Showdown.converter(); | |
return { | |
restrict: 'AE', | |
link: function (scope, element, attrs) { | |
if (attrs.markdown) { | |
scope.$watch(attrs.markdown, function (newVal) { | |
var html = converter.makeHtml(newVal); | |
element.html(html); | |
}); |
This file contains 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
CAKeyframeAnimation *popAnimation = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; | |
popAnimation.duration = 0.4; | |
popAnimation.values = @[[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.01f, 0.01f, 1.0f)], | |
[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.1f, 1.1f, 1.0f)], | |
[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9f, 0.9f, 1.0f)], | |
[NSValue valueWithCATransform3D:CATransform3DIdentity]]; | |
popAnimation.keyTimes = @[@0.0f, @0.5f, @0.75f, @1.0f]; | |
popAnimation.timingFunctions = @[[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut], | |
[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut], | |
[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; |
This file contains 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
angular | |
.module('loadingOnAJAX', []) | |
.config(function($httpProvider) { | |
var numLoadings = 0; | |
var loadingScreen = $('<div style="position:fixed;top:0;left:0;right:0;bottom:0;z-index:10000;background-color:gray;background-color:rgba(70,70,70,0.2);"><img style="position:absolute;top:50%;left:50%;" alt="" src="data:image/gif;base64,R0lGODlhQgBCAPMAAP///wAAAExMTHp6etzc3KCgoPj4+BwcHMLCwgAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAQgBCAAAE/xDISau9VBzMu/8VcRTWsVXFYYBsS4knZZYH4d6gYdpyLMErnBAwGFg0pF5lcBBYCMEhR3dAoJqVWWZUMRB4Uk5KEAUAlRMqGOCFhjsGjbFnnWgliLukXX5b8jUUTEkSWBNMc3tffVIEA4xyFAgCdRiTlWxfFl6MH0xkITthfF1fayxxTaeDo5oUbW44qaBpCJ0tBrmvprc5GgKnfqWLb7O9xQQIscUamMJpxC4pBYxezxi6w8ESKU3O1y5eyts/Gqrg4cnKx3jmj+gebevsaQXN8HDJyy3J9OCc+AKycCVQWLZfAwqQK5hPXR17v5oMWMhQEYKLFwmaQTDgl5OKHP8cQjlGQCHIKftOqlzJsqVLPwJiNokZ86UkjDg5emxyIJHNnDhtCh1KtGjFkt9WAgxZoGNMny0RFMC4DyJNASZtips6VZkEp1P9qZQ3VZFROGLPfiiZ1mDKHBApwisZFtWkmNSUIlXITifWtv+kTl0IcUBSlgY |
This file contains 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
/** | |
* Loading Indicator | |
* | |
* @author Maikel Daloo | |
* @date 12th March 2013 | |
* | |
* Creates a new module and intercepts all ajax requests. | |
* Every time a request is sent, we display the loading message and increment | |
* the enable_counter variable. Then when requests complete (whether success or error) | |
* we increment the disable_counter variable and we only hide the loading message |
This file contains 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
APP = Pages | |
WORKSPACE = Pages | |
CONFIG = InHouse | |
SCHEME = PagesInHouse | |
ICON_NAME = [email protected] | |
BASE_URL = http://beta.nsnotfound.com/pages | |
EMAIL_LIST = [email protected] | |
EMAIL_DOMAIN = lexrus.mailgun.org | |
SFTP_SERVER = [email protected] |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import shutil | |
import json | |
import getopt | |
import urllib2 | |
from urllib import urlencode |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import shutil | |
import json | |
import getopt | |
import urllib2 | |
from urllib import urlencode |