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
#find file | |
find . -name "*.*" |
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
# Built application files | |
*.apk | |
*.ap_ | |
# Files for the Dalvik VM | |
*.dex | |
# Java class files | |
*.class |
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
import android.net.SSLCertificateSocketFactory; | |
import android.os.AsyncTask; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.IOException; | |
import java.io.InputStream; |
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
defaults write com.apple.appstore ShowDebugMenu -bool true |
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
alias adbforw=./adb forward tcp:7777 tcp:7777 | |
alias apkd=/.apktool d | |
alias apkb=/.apktool b | |
adb shell date $(date +%m%d%H%M%Y) |
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
/** | |
* Each presenter must implement this interface | |
* | |
* @param <V> View for the presenter | |
</V> */ | |
interface BaseMvpPresenter<V : BaseView> { | |
/** | |
* @return true if view is attached to presenter | |
*/ |
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
private void sendRequest() { | |
requestQueue = Volley.newRequestQueue(this, new HurlStack(null, pinnedSSLSocketFactory())); | |
StringRequest request = new StringRequest(Request.Method.GET, SECURE_URL, new Response.Listener<String>() { | |
@Override | |
public void onResponse(String response) { | |
Toast.makeText(MainActivity.this, "Response: " + response, Toast.LENGTH_SHORT).show(); | |
} | |
}, new Response.ErrorListener() { | |
@Override | |
public void onErrorResponse(VolleyError error) { |
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 MyRecyclerViewAdapter(private val list: List<MyModel>) : RecyclerView.Adapter<MyRecyclerViewAdapter.ViewHolder>() { | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { | |
val view = LayoutInflater.from(parent.context).inflate(R.layout.row_recycler, parent, false) | |
return ViewHolder(view) | |
} | |
override fun onBindViewHolder(holder: ViewHolder, position: Int) { | |
val myModel = list[position] | |
holder.title.text = myModel.title |
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 objkeys(obj){ | |
keys = Object.keys(obj); | |
var ret = ""; | |
for (var o in keys){ | |
ret = ret +keys[o] + "=>" + obj[keys[o]] + "\n"; | |
} | |
return ret; | |
} |
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
#!/bin/bash | |
file=$1 | |
basename="${file%%.*}" | |
javac $file | |
java $basename |
OlderNewer