This file contains hidden or 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
+ (BOOL)isConnectedToNetwork { | |
// Recover reachability flags | |
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorSystemDefault, [@"twitter.com" UTF8String]); | |
SCNetworkReachabilityFlags flags; | |
BOOL didRetrieveFlags = SCNetworkReachabilityGetFlags(reachability, &flags); | |
CFRelease(reachability); | |
if (!didRetrieveFlags) { |
This file contains hidden or 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 | |
#chkconfig: 2345 80 05 | |
#description: Nginx | |
. /etc/rc.d/init.d/functions | |
INITLOG_ARGS="" | |
nginx=/usr/local/nginx/sbin/nginx | |
prog=nginx |
This file contains hidden or 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
var list = $('ul#books'); | |
$.ajax({ | |
url: 'http://api.new.youversion.com/1.0/bible/books.json', |
This file contains hidden or 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 | |
while [ 1 ] | |
do | |
if [ ! -e $1 ] | |
then | |
echo "Created" | |
echo $2 > $1 | |
fi | |
n=$RANDOM | |
let "n = (n % 1) + 5" |
NewerOlder