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
/* | |
Monitor | |
*/ | |
const int ledPin = 9; // the pin that the LED is attached to | |
void setup() | |
{ | |
// initialize the serial communication: | |
Serial.begin(9600); |
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
set-option -g utf8 on | |
set-option -g status-utf8 on | |
unbind '"' | |
bind - splitw -v # | |
unbind % | |
bind | splitw -h # | |
bind k selectp -U # | |
bind j selectp -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
#!/bin/bash | |
outpath="$HOME/"$PRODUCT_NAME"_IPAs" | |
subdirname=`date "+%Y-%m-%d_%H.%M.%S"` | |
ipaname=$PRODUCT_NAME"_"$subdirname".ipa" | |
apppath=$TARGET_BUILD_DIR"/"$PRODUCT_NAME".app" | |
sympath=$TARGET_BUILD_DIR"/"$PRODUCT_NAME".app.dSYM" | |
echo $outpath | |
if [ -d $outpath ]; then |
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 | |
ipaddr=$(ifconfig | sed -ne 's/ *inet addr:\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\) *B.*/\1/p') | |
echo $'\x1b\x5b\x48\x1b\x5b\x32\x4a\x0a''Arch Linux \r ['$ipaddr'] (\n) (\l)' > /etc/issue |
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
// | |
// OPRunOnce.h | |
// Run action only at current version first run. | |
// It is very easy to use. | |
// Just Call runOnce:action, specify the only key to | |
// the action and target. | |
// | |
#import <Foundation/Foundation.h> |
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
# Automator service script | |
# sed -e's/\[//' 删[ | |
# sed -e's/\]//' 删] | |
# sed -e's/ release//' 删release | |
# sed -e's/\([A-Za-z_0-9].*\);/SAFE_ARC_RELEASE(\1);/' 增加SAFE_ARC_RELEASE | |
sed -e's/\[//' | sed -e's/\]//' | sed -e's/ release//' | sed -e's/\([A-Za-z_0-9].*\);/SAFE_ARC_RELEASE(\1);/' |
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 <Python.h> | |
#include <stdio.h> | |
/* | |
* gcc embpython.c -I/usr/include/python2.7 -lpython | |
**/ | |
void loadModule() | |
{ | |
/* run objects with low-level calls */ | |
char *arg1="sir", *arg2="robin", *cstr; | |
printf("Load Module err!\n"); |
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 | |
# simple batch rename | |
cmd="" | |
ext="" | |
if [ "$#" -eq 1 ]; then | |
ext=$1 | |
cmd="ls *."$ext | |
else |
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
/* | |
* System Versioning Preprocessor Macros | |
*/ | |
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) | |
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) | |
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) |
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 <Foundation/Foundation.h> | |
CFPropertyListRef CreateMyPropertyListFromFile(CFURLRef fileURL) | |
{ | |
CFPropertyListRef propertyList; | |
CFStringRef errorString; | |
CFDataRef resourceData; | |
Boolean status; | |
SInt32 errorCode; | |
NewerOlder