Skip to content

Instantly share code, notes, and snippets.

Pitus660 / currency-dropdown-list.html
Last active Nov 7, 2019 — forked from AmrMekkawy/currency-dropdown-list.html
Currency HTML "select" element (dropdown list)
View currency-dropdown-list.html
<select class="custom-select mr-sm-2" id="productCurrency">
<option value="USD">United States Dollars</option>
<option value="EUR" selected >Euro</option>
<option value="GBP">United Kingdom Pounds</option>
<option value="DZD">Algeria Dinars</option>
<option value="ARP">Argentina Pesos</option>
<option value="AUD">Australia Dollars</option>
<option value="ATS">Austria Schillings</option>
<option value="BSD">Bahamas Dollars</option>
<option value="BBD">Barbados Dollars</option>
Pitus660 /
Created Jul 9, 2019 — forked from rantav/
Find slow queries in mongo DB

A few show tricks to find slow queries in mongodb

Enable profiling

First, you have to enable profiling

> db.setProfilingLevel(1)

Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...

Pitus660 /
Created Feb 15, 2016 — forked from alotaiba/
Google Speech To Text API

Google Speech To Text API

Base URL:
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

The client's name you're connecting from. For spoofing purposes, let's use chromium

Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English

View gcmcss.js
var xmpp = require('node-xmpp');
//Set node-xmpp options.
//Replace with your projectID in the jid and your API key in the password
//The key settings for CCS are the last two to force SSL and Plain SASL auth.
var options = {
type: 'client',
jid: '',
password: 'XXXXXXXX',
port: 5235,
View genymotionwithplay.txt
Download the following ZIPs:
ARM Translation Installer v1.1 (
Download the correct GApps for your Android version:
Google Apps for Android 5.0 ( -
Google Apps for Android 4.4.4 ( -
Google Apps for Android 4.3 ( -
Google Apps for Android 4.2 ( -
Google Apps for Android 4.1 ( -
View overrideLifeCycle
private void overrideLifeCycle(Context ctx) {
Application application = (Application) ctx.getApplicationContext();
application.registerActivityLifecycleCallbacks(new Application.ActivityLifecycleCallbacks() {
public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
Log.d("onActivityCreated --->" + activity.getLocalClassName());
View UncaughtExceptionHandler
private Thread.UncaughtExceptionHandler defaultHandler;
class PushUncaughtExceptionHandler
implements Thread.UncaughtExceptionHandler {
public void uncaughtException(Thread thread, Throwable ex) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("PUSH expection----> " + thread.getName() + "exx--> " + ex.getCause()+"\n");
for (StackTraceElement element : ex.getStackTrace()) {
stringBuilder.append(element.toString() + "\n");