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
@interface ScrollView <UIScrollViewDelegate,UITextFieldDelegate> { | |
UITextField *_currentTF; | |
} | |
@implementation | |
- (void)viewDidLoad { | |
yourScrollView.delegate = self; | |
yourTextField.delegate = self; | |
} |
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
#import "MySingletonClass.h" | |
static MySingletonClass *singleton = nil; | |
@implementation MySingletonClass | |
+ (MySingletonClass *)defaultSingleton{ | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
singleton = [[MySingletonClass alloc] init]; |
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
REV_GIT=`git svn info |grep Revision: |cut -c11-` | |
REV_SVN=`svn info |grep Revision: |cut -c11-` | |
if [ -z $REV_GIT ] ;then | |
REV=$REV_SVN | |
else | |
REV=$REV_GIT | |
fi | |
echo "REV is $REV" | |
BASEVERNUM=`/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "${INFOPLIST_FILE}"` |
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 | |
LOCALHOST=http://localhost:2368 | |
URL=http://hackinggate.com | |
LOCALDOMAIN=localhost:2368 | |
DOMAIN=hackinggate.com | |
buster generate --domain=$LOCALHOST | |
#get rss & sitemap | |
wget -O- http://127.0.0.1:2368/rss/ > ./static/rss/index.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
// Available types : https://developer.apple.com/library/prerelease/ios/documentation/AVFoundation/Reference/AVMetadataMachineReadableCodeObject_Class/index.html#//apple_ref/doc/constant_group/Machine_Readable_Object_Types | |
import AVFoundation | |
let metadataObjectTypes = [ | |
AVMetadataObjectTypeUPCECode, | |
AVMetadataObjectTypeCode39Code, | |
AVMetadataObjectTypeCode39Mod43Code, | |
AVMetadataObjectTypeEAN13Code, | |
AVMetadataObjectTypeEAN8Code, | |
AVMetadataObjectTypeCode93Code, |
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
global { | |
perm_cache=2048; | |
cache_dir="/var/pdnsd"; | |
# pid_file = /var/run/pdnsd.pid; | |
run_as="nobody"; | |
server_ip = 0.0.0.0; # Use eth0 here if you want to allow other | |
# machines on your network to query pdnsd. | |
server_port = 25252; | |
status_ctl = on; | |
# paranoid=on; # This option reduces the chance of cache poisoning |
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
PROG=/usr/sbin/Pcap_DNSProxy | |
LOGTIME=$(date "+%Y-%m-%d %H:%M:%S") | |
if [ $(ps|grep ${PROG}|grep -v grep|wc -l) -ge 1 ]; then | |
echo "['$LOGTIME'] Pcap_DNSProxy is running, PID is $(pidof ${PROG##*/})" | |
else | |
echo "['$LOGTIME'] Pcap_DNSProxy is not running." | |
/etc/init.d/pcap-dnsproxy start | |
fi |
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
# CocoaPods aliases | |
alias pod_install_quick="pod install --no-repo-update" | |
alias pod_update_quick="pod update --no-repo-update" | |
alias pod_repo_update="pod repo update" |
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
VERSION=19.07.7 | |
# Download imagebuilder for R7800. | |
aria2c -c -x4 -s4 https://downloads.openwrt.org/releases/${VERSION}/targets/ipq806x/generic/openwrt-imagebuilder-${VERSION}-ipq806x-generic.Linux-x86_64.tar.xz | |
# Extract & remove used file & cd to the directory | |
tar -xvf openwrt-imagebuilder-${VERSION}-ipq806x-generic.Linux-x86_64.tar.xz | |
rm openwrt-imagebuilder-${VERSION}-ipq806x-generic.Linux-x86_64.tar.xz | |
cd openwrt-imagebuilder-${VERSION}-ipq806x-generic.Linux-x86_64/ |
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 | |
LOGTIME=$(date "+%Y-%m-%d %H:%M:%S") | |
# CHANGE THESE | |
auth_email="[email protected]" | |
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # find in cloudflare account settings | |
record_name="www.example.com" | |
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353" # get zone ID via API and store it here | |
record_identifier_ipv4="372e67954025e0ba6aaa6d586b9e0b59" # use List DNS Records api to get record id, link below ↓ |
OlderNewer