Skip to content

Instantly share code, notes, and snippets.

View Raztor0's full-sized avatar

Razvan Bangu Raztor0

View GitHub Profile
@Raztor0
Raztor0 / fb_bot_redirect.php
Created December 31, 2018 09:19
Redirect for Facebook's social preview bot
<?php
$user_agent = $_SERVER["HTTP_USER_AGENT"];
if (strpos($user_agent, "facebookexternalhit") !== false) {
header("Location: https://runescape.com");
} else {
echo("poc.razb.me");
}
{
"Host": "poc.razb.me",
"Connection": "Keep-Alive",
"Accept-Encoding": "gzip",
"User-Agent": "Mozilla\\/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/71.0.3578.98 Safari\\/537.36",
}
@Raztor0
Raztor0 / facebook_header.json
Last active December 31, 2018 09:10
fb headers
{
"Host": "poc.razb.me",
"Connection": "Keep-Alive",
"Accept-Encoding": "gzip",
"Accept": "*\\/*",
"User-Agent": "facebookexternalhit\\/1.1 (+http:\\/\\/www.facebook.com\\/externalhit_uatext.php)",
}
@Raztor0
Raztor0 / example.m
Last active March 3, 2018 23:47
NSJSONSerialization EXC_BAD_ACCESS KERN_INVALID_ADDRESS
+ (void)load {
static NSMutableDictionary *myMutableDict;
static NSDictionary *myDict;
myMutableDict = [NSMutableDictionary dictionaryWithDictionary:@{}];
myDict = @{@"sub_dict" : myMutableDict};
/* Hop on a background thread */
dispatch_async(dispatch_get_global_queue(0, 0), ^{
/* Constantly mutate the mutable dictionary */
@Raztor0
Raztor0 / archived-expanded-entitlements.xcent
Created December 30, 2017 01:28
archived-expanded-entitlements.xcent
<?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>application-identifier</key>
<string>69CN5HMUNT.co.razio.RS-Exchange</string>
<key>keychain-access-groups</key>
<array>
<string>69CN5HMUNT.co.razio.RS-Exchange</string>
</array>
@Raztor0
Raztor0 / CodeResources
Created December 30, 2017 01:19
CodeResources
<?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>files</key>
<dict>
<key>AppIcon29x29.png</key>
<data>
g3rQDPhaPPiICI9uF1X6Zu/z7eI=
</data>
@Raztor0
Raztor0 / Manifest.plist
Created December 30, 2017 01:11
Manifest.plist
<?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>SinfPaths</key>
<array>
<string>SC_Info/RS Xchange.sinf</string>
</array>
<key>SinfReplicationPaths</key>
<array>
@Raztor0
Raztor0 / OSRSItemSearchTableViewCell.xib
Created December 30, 2017 00:42
OSRSItemSearchTableViewCell.xib
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
<?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>UIStoryboardDesignatedEntryPointIdentifier</key>
<string>UIViewController-x1L-Z2-jkR</string>
<key>UIStoryboardVersion</key>
<integer>1</integer>
<key>UIViewControllerIdentifiersToNibNames</key>
<dict>
@Raztor0
Raztor0 / Info.plist
Created December 29, 2017 21:58
Info.plist
<?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>DTXcode</key>
<string>0720</string>
<key>DTSDKName</key>
<string>iphoneos9.2</string>
<key>CFBundleName</key>
<string>RS Xchange</string>