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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// init VPN manager | |
self.vpnManager = [NEVPNManager sharedManager]; | |
// load config from perference | |
[_vpnManager loadFromPreferencesWithCompletionHandler:^(NSError *error) { |
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 -*- | |
from __future__ import print_function, unicode_literals | |
import requests | |
import unicodedata | |
import re | |
from datetime import datetime |
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
#!/bin/sh | |
PLIST_BUDDY=/usr/libexec/PlistBuddy | |
function add_compatibility() { | |
"$PLIST_BUDDY" -c "Add DVTPlugInCompatibilityUUIDs:10 string $2" \ | |
"$1/Contents/Info.plist" | |
} | |
function has_compatibility() { |
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 json | |
import os | |
from datetime import datetime | |
FILE_NAME = 'messages.json' | |
class DataBase(object): |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>PayloadContent</key> | |
<array> | |
<dict> | |
<key>IKEv2</key> | |
<dict> | |
<key>AuthName</key> |
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 json | |
import os | |
from datetime import datetime | |
from dateutil import parser, tz | |
def dump_json(obj): | |
return json.dumps(obj, indent=4, |
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
"slack.com", | |
"slack-imgs.com", | |
"slack-edge.com", | |
"slack-msgs.com", | |
"api.mixpanel.com", | |
"global.ssl.fastly.net", | |
"amazonaws.com", |
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
- (NSString *)executableUUID { | |
const struct mach_header *executableHeader = NULL; | |
for (uint32_t i = 0; i < _dyld_image_count(); i++) { | |
const struct mach_header *header = _dyld_get_image_header(i); | |
if (header->filetype == MH_EXECUTE) { | |
executableHeader = header; | |
break; | |
} | |
} | |
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
#!/bin/bash | |
find ./ -name "*.a" | xargs nm -gU | sed -n -e 's/.*_OBJC_CLASS_$_\(.*\)/\1/p' |
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
#!/bin/bash | |
# Usage: ./icon.sh icon.png | |
icon=$1 | |
icon_name=${icon%.*} | |
icon_dir=${icon}.iconset | |
icon_tmp_path=/tmp/${icon_dir} |