thanks 4 putting source for a noob to learn a little
-
DocSets-for-iOS and paid 4 it too https://github.com/omz/DocSets-for-iOS/
-
Real Time Congress
thanks 4 putting source for a noob to learn a little
DocSets-for-iOS and paid 4 it too https://github.com/omz/DocSets-for-iOS/
Real Time Congress
#! /bin/bash | |
MYSQL="/opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper" | |
NGINX="/opt/local/sbin/nginx" | |
PHPFPM="/opt/local/sbin/php-fpm" | |
PIDPATH="/opt/local/var/run" | |
MEMCACHED="/opt/local/bin/memcached -m 24 -P /opt/local/var/run/memcached.pid -u root" | |
if [ $1 = "start" ]; then | |
sudo $MYSQL start | |
echo "Starting php-fpm ..." |
xcodePath=`xcode-select -p` | |
xcodeUUID=`defaults read "$xcodePath/../../Contents/Info.plist" DVTPlugInCompatibilityUUID` | |
echo $xcodeUUID | |
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add $xcodeUUID |
override func viewDidLayoutSubviews() { | |
super.viewDidLayoutSubviews() | |
// Dynamic sizing for the header view | |
if let headerView = tableView.tableHeaderView { | |
let height = headerView.systemLayoutSizeFittingSize(UILayoutFittingCompressedSize).height | |
var headerFrame = headerView.frame | |
// If we don't have this check, viewDidLayoutSubviews() will get | |
// repeatedly, causing the app to hang. |
netstat -tn 2>/dev/null | grep :80 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head |
import UIKit | |
// MARK: - UIView | |
extension UIView { | |
@IBInspectable var cornerRadius: CGFloat { | |
get { | |
return layer.cornerRadius | |
} | |
set { |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
import com.google.gson.Gson; | |
import com.google.gson.JsonSyntaxException; | |
import com.android.volley.AuthFailureError; | |
import com.android.volley.NetworkResponse; | |
import com.android.volley.ParseError; | |
import com.android.volley.Request; | |
import com.android.volley.Response; | |
import com.android.volley.Response.ErrorListener; | |
import com.android.volley.Response.Listener; |
package com.example.yourapp; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
import com.example.yourapp.AuthenticationModel; | |
import retrofit.client.Header; | |
import retrofit.client.OkClient; |
// source:http://www.onextrapixel.com/2012/10/12/5-code-snippets-for-interacting-with-wordpress-post-content-effectively/ | |
function auto_nofollow($content) { | |
//return stripslashes(wp_rel_nofollow($content)); | |
return preg_replace_callback('/<a>]+/', 'auto_nofollow_callback', $content); | |
} | |
add_filter('comment_text', 'auto_nofollow'); | |
function auto_nofollow_callback($matches) { | |
$link = $matches[0]; | |
$site_link = get_bloginfo('url'); | |
if (strpos($link, 'rel') === false) { |