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
@echo off | |
echo setting perforce env ... | |
rem set below variables in conformity with your environments. | |
set P4PORT= | |
set P4_HOME= | |
set REMOTE_DEV_TREE= | |
set REMOTE_INT_TREE= | |
set LOCAL_DEV_TREE= |
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 | |
python_count=0 | |
toggle_count=0 | |
local_count=0 | |
log_list=$(ls /etc/httpd/logs/access_log*) | |
for log in $log_list | |
do | |
tmp=$(cat $log | grep python | wc -l) |
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 | |
for f in *.jpg | |
do | |
mv $f "`basename $f .jpg`_en.jpg" | |
done |
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
echo "setting perforce env..." | |
export P4PORT= | |
export P4EDITOR=vim | |
export P4PASSWD= | |
export P4USER= | |
export P4CLIENT= | |
REMOTE_DEV_TREE= | |
REMOTE_INT_TREE= |
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
#include <stdio.h> | |
#include <curl/curl.h> | |
int main(void) | |
{ | |
CURL *curl; | |
CURLcode ret; | |
char* resolved_url = NULL; | |
curl = curl_easy_init(); | |
if(curl) |
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 | |
SDK=`dirname $0` | |
SCRIPT=`basename $0` | |
SDKPARENT=`dirname $SDK` | |
DEVROOT=`xcode-select --print-path` | |
SDKVER=`xcodebuild -showsdks | grep iphoneos | awk '{print $2}' | tail -n 1` | |
SDKROOT="$DEVROOT/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$SDKVER.sdk" | |
SDKsROOT="$DEVROOT/Platforms/iPhoneOS.platform/Developer/SDKs" | |
PLATFORM=`uname -sp` |
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 | |
find . -name "*.pbxproj" -exec sed -i "*.bak" '/GCC_VERSION/d' {} \; | |
find . -name "*.pbxproj" -exec sed -i "*.bak" '/SDKROOT =/d' {} \; | |
find . -name "*.pbxproj" -exec sed -i "*.bak" '/MACOSX_DEPLOYMENT_TARGET =/d' {} \; |
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* getInternalDiskSN() | |
{ | |
NSString* result = @""; | |
CFMutableDictionaryRef matching; | |
matching = IOServiceMatching("IOAHCIBlockStorageDevice"); | |
io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, matching); | |
if (service) { | |
CFMutableDictionaryRef properties = NULL; |
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
# create a symlink to avoid the the ugly-long-hard-remember derived data path like: | |
# ~/Library/Developer/Xcode/DerivedData/XXXXXX-aeuhuddtlmcrpvczljaagufyzgpw/Build/Products/Debug/ | |
if [ -L build ];then | |
rm -rf build | |
fi | |
if [ ! -d build ]; then | |
ln -s "${BUILT_PRODUCTS_DIR}" build | |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <libproc.h> | |
int main (int argc, char* argv[]) | |
{ | |
int ret; | |
pid_t pid; |
OlderNewer