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
sudo /etc/init.d/mysql stop | |
sudo mysqld_safe --skip-grant-tables & | |
mysql -u root | |
use mysql; | |
update user set password=PASSWORD("secure_password") where User='root'; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
android:versionCode="48513" android:versionName="2.11.301" package="com.whatsapp"> | |
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"> | |
</uses-permission> | |
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"> | |
</uses-permission> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"> | |
</uses-permission> | |
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"> |
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
/* | |
SMINT V1.0 by Robert McCracken | |
SMINT V2.0 by robert McCracken with some awesome help from Ryan Clarke (@clarkieryan) and mcpacosy (@mcpacosy) | |
SMINT is my first dabble into jQuery plugins! | |
http://www.outyear.co.uk/smint/ | |
If you like Smint, or have suggestions on how it could be improved, send me a tweet @rabmyself |
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
RailsAdmin.config do |config| | |
config.actions do | |
dashboard | |
index | |
new | |
show | |
edit | |
delete | |
collection :upload_renewals do |
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
/*! | |
* jQuery Wiggle | |
* http://www.userdot.net/#!/jquery | |
* | |
* Copyright 2011, UserDot www.userdot.net | |
* Licensed under the GPL Version 3 license. | |
* Version 1.0.0 | |
* | |
* Updated by http://github.com/kimenye | |
* |
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 Fruit | |
attr_accessor :type, :unit_price, :discount_quantity, :discount_price, :offer | |
def initialize(type,unit_price, discount_quantity=nil, discount_price=nil, offer=false) | |
@type = type | |
@unit_price = unit_price | |
@discount_quantity = discount_quantity | |
@discount_price = discount_price | |
@offer = offer | |
end | |
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
def detect_character_that_occurs_only_once line | |
if !line.nil? | |
the_char = line.each_char.detect { |char| line.count(char) == 1} | |
end | |
the_char | |
end |
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
if ENV['MONGOHQ_URL'] | |
uri = URI.parse(ENV['MONGOHQ_URL']) | |
MongoMapper.connection = Mongo::Connection.from_uri(ENV['MONGOHQ_URL']) | |
MongoMapper.database = uri.path.gsub(/^\//, '') | |
puts ">> db is #{uri.path.gsub(/^\//, '')}" | |
end |
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
# -*- coding: utf-8 -*- | |
""" | |
MongoHQURL | |
~~~~~~~~~~ | |
A utility for converting a MONGOHQ url to an object so that mongo engine can connect to it. | |
usage: | |
------ | |
from util import MongoHQURL |
NewerOlder