-
Open the Terminal
-
Use
mysqldump
to backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql
-
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql
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
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
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
function DeCasteljauBezier(points, density, step){ | |
//if (points.length < 3) return null; | |
console.time('bezier'); | |
var ps = points.map(function(p){ | |
return { | |
x: p.x, | |
y: p.y | |
}; | |
}), | |
results = [], |
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
extension NSAttributedString { | |
func replaceHTMLTag(tag: String, withAttributes attributes: [String: AnyObject]) -> NSAttributedString { | |
let openTag = "<\(tag)>" | |
let closeTag = "</\(tag)>" | |
let resultingText: NSMutableAttributedString = self.mutableCopy() as NSMutableAttributedString | |
while true { | |
let plainString = resultingText.string as NSString | |
let openTagRange = plainString.rangeOfString(openTag) | |
if openTagRange.length == 0 { |
This is a current proposal that I'd like your feedback on for how we can clean up how we write RubyMotion applications. It's purely conceptual at the moment, and there would have to be some framework development to make this work the way described here.
Please submit your feedback, as a joint effort we can clean up our RubyMotion applications and make it easier for Rails developers to expand their skills into RubyMotion development.
The main points of this are:
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
app.info_plist['UIStatusBarStyle'] = 'UIStatusBarStyleBlackTranslucent' | |
app.info_plist["UIViewControllerBasedStatusBarAppearance"] = false |
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
class Instagram < PM::WebScreen | |
title "Instagram" | |
CLIENT_ID = 'your client id' | |
REDIRECT_URI = 'http://your.domain.com/auth/instagram/callback' | |
FAILURE_URL = 'http://your.domain.com/auth/failure' | |
AUTH_URI = "https://instagram.com/oauth/authorize/?client_id=#{CLIENT_ID}&redirect_uri=#{REDIRECT_URI}&response_type=token" | |
class << self | |
def api |
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
class EventCell < UITableViewCell | |
IDENTIFIER = 'EventCell' | |
PADDING = 10 | |
LEFT_MARGIN = 40 | |
RIGHT_MARGIN = 20 | |
attr_reader :event | |
def initWithStyle(style, reuseIdentifier: reuse_identifier) | |
super.tap do |cell| |
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
BW::Location.get(distance_filter: 10, desired_accuracy: :nearest_ten_meters) do |result| | |
geocoder = CLGeocoder.alloc.init | |
geocoder.reverseGeocodeLocation result[:to], completionHandler: lambda {|location, x| | |
alert = UIAlertView.alloc.init | |
alert.message = "#{location[0].locality} : #{location[0].postalCode}" | |
alert.show | |
} | |
end |
NewerOlder