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/bash | |
| # Copyright (c) 2011 Float Mobile Learning | |
| # http://www.floatlearning.com/ | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining | |
| # a copy of this software and associated documentation files (the "Software"), | |
| # to deal in the Software without restriction, including without limitation | |
| # the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| # and/or sell copies of the Software, and to permit persons to whom the |
| #!/bin/bash | |
| echo "Generating an SSL private key to sign your certificate..." | |
| openssl genrsa -des3 -out myssl.key 1024 | |
| echo "Generating a Certificate Signing Request..." | |
| openssl req -new -key myssl.key -out myssl.csr | |
| echo "Removing passphrase from key (for nginx)..." | |
| cp myssl.key myssl.key.org | |
| openssl rsa -in myssl.key.org -out myssl.key |
| sudo /edx/bin/supervisorctl | |
| restart edxapp: edxapp_worker: |
| # Step 1 | |
| usage () | |
| { | |
| echo 'This script is used to copy the code history of one repository to another repository' | |
| echo 'Please provide the parameters as below' | |
| echo 'Usage : Script <SOURCE_REPO_URL> <DST_REPO_URL> <source_repo_name> <dest_repo_name>' | |
| exit | |
| } |
| usage () | |
| { | |
| echo 'This script is used to migrate the SVN repo to GIT repo' | |
| echo 'Please provide the parameters as below' | |
| echo 'Usage : Script <SVN_REPO_URL> <GIT_REPO_URL>' | |
| echo 'Usage : Script http://10.42.0.54/mysvn/myrepo/SocialShare git@github.com:manishpathak99/socialshare.git' | |
| exit | |
| } | |
| if [ "$#" -ne 2 ] |
| public class GooglePlayServiceUtil { | |
| private static final int PLAY_SERVICES_RESOLUTION_REQUEST = 9000; | |
| /** | |
| * Use this method in onCreate method of activity | |
| * | |
| * Check the device to make sure it has the Google Play Services APK. If | |
| * it doesn't, display a dialog that allows users to download the APK from | |
| * the Google Play Store or enable it in the device's system settings. |
| 1- reduce the other's language strings in string.xml | |
| add below in build.gradle- | |
| defaultConfig { | |
| resConfigs "en" | |
| } | |
| 2- unzip the final apk, go to res directory, run the below commamd to know the size of resfiles in descending order. | |
| find . -type f -exec ls -al {} \; | sort -nr -k5 | head -n 25 |
| # Optimize logging away from release builds | |
| -assumenosideeffects class android.util.Log { | |
| public static *** d(...); | |
| public static *** v(...); | |
| public static *** i(...); | |
| public static *** e(...); | |
| public static *** w(...); | |
| public static *** wtf(...); | |
| public static *** isLoggable(...); |
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| import Foundation | |
| import Alamofire | |
| extension Alamofire.DataRequest { | |
| func responseDebugPrint() -> Self { | |
| return responseJSON() { | |
| response in | |
| if let JSON = response.result.value, | |
| let JSONData = try? JSONSerialization.data(withJSONObject: JSON, options: .prettyPrinted), | |
| let prettyString = NSString(data: JSONData, encoding: String.Encoding.utf8.rawValue) { |