Install osxfuse
(3.x.x) from https://github.com/osxfuse/osxfuse/releases.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
#!/bin/sh | |
remote="$1" | |
url="$2" | |
message=$(git log -1 HEAD --pretty=format:%s) | |
public_repo="/Users/Moz/Desktop/public" | |
[ -d lang ] && yes | cp -rf lang/* $public_repo/lang | |
[ -d updates ] && yes | cp -rf updates/* $public_repo/updates | |
cd $public_repo |
//JS Version | |
var charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', | |
randomString = '' | |
for (var i = 0; i < length; i++) { | |
var randomPos = Math.floor(Math.random() * charSet.length) | |
randomString += charSet.substring(randomPos, randomPos + 1) | |
} | |
return randomString |
import android.view.Menu; | |
import android.view.MenuInflater; | |
import android.content.Context; | |
import android.support.v7.view.menu.MenuBuilder; | |
public class StringUtils { | |
/* | |
* Usage: String[] mMenuItems = StringUtils.getArrayFromMenu(this, R.menu.menu_main); | |
* And then mDrawerList.setAdapter(new ArrayAdapter<>(this, R.layout.item_listview_drawer, mMenuItems)); |
public static void setListViewHeightBasedOnChildren(ListView listView) | |
{ | |
ListAdapter listAdapter = listView.getAdapter(); | |
if(listAdapter == null) return; | |
if(listAdapter.getCount() <= 1) return; | |
int desiredWidth = MeasureSpec.makeMeasureSpec(listView.getWidth(), MeasureSpec.AT_MOST); | |
int totalHeight = 0; | |
View view = null; | |
for(int i = 0; i < listAdapter.getCount(); i++) |
diff --git i/facebook-android-sdk-3.6.0/facebook/src/com/facebook/widget/WebDialog.java w/facebook-android-sdk-3.6.0/facebook/src/com/facebook/widget/WebDialog.java | |
index 70ac868..c2c9af0 100644 | |
--- i/facebook-android-sdk-3.6.0/facebook/src/com/facebook/widget/WebDialog.java | |
+++ w/facebook-android-sdk-3.6.0/facebook/src/com/facebook/widget/WebDialog.java | |
@@ -17,6 +17,7 @@ | |
package com.facebook.widget; | |
import android.annotation.SuppressLint; | |
+import android.app.AlertDialog; | |
import android.app.Dialog; |
/** | |
* The Task Below uses the Dex Tool to create classes.dex file for the archive | |
* This dex file can be then be loaded at runtime to prevent the 64K Dalvik Method Limit | |
*/ | |
import org.apache.tools.ant.taskdefs.condition.Os | |
android.libraryVariants.all { variant -> | |
def name = variant.buildType.name | |
if (name.equals(com.android.builder.BuilderConstants.DEBUG)) { | |
return; // Skip debug builds. | |
} |
osxfuse
(3.x.x) from https://github.com/osxfuse/osxfuse/releases.ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
public function numberToCurrency($num) | |
{ | |
if(setlocale(LC_MONETARY, 'en_IN')) | |
return money_format('%.0n', $num); | |
else { | |
$explrestunits = "" ; | |
if(strlen($num)>3){ | |
$lastthree = substr($num, strlen($num)-3, strlen($num)); | |
$restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits | |
$restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping. |
function push() { | |
if [ -z "${1}" ]; then | |
echo "Usage: push <remote-name>" | |
return 1 | |
fi; | |
GIT_DIR_="$(git rev-parse --git-dir)" | |
BRANCH="$(git rev-parse --symbolic --abbrev-ref $(git symbolic-ref HEAD))" |
// | |
// Returns list after splitting a string by a delimiter string. | |
// Similar to PHP's explode function | |
// | |
@function explode($string, $delimiter: "", $separator: "space") | |
@if type-of($string) != "string" | |
@warn "`explode` function expecting a string; #{type-of($string)} given." | |
@return null | |
@if type-of($delimiter) != "string" | |
@warn "`explode` function expecting a string; #{type-of($delimiter)} given." |