Skip to content

Instantly share code, notes, and snippets.

View alizahid's full-sized avatar

Ali Zahid alizahid

View GitHub Profile
alizahid / country-code-to-currency-code-mapping.csv
Created December 21, 2018 21:13 — forked from HarishChaudhari/country-code-to-currency-code-mapping.csv
Country, Country Code, Currency code mapping in CSV format Taken from Contains 249 countries.
Country CountryCode Currency Code
New Zealand NZ New Zealand Dollars NZD
Cook Islands CK New Zealand Dollars NZD
Niue NU New Zealand Dollars NZD
Pitcairn PN New Zealand Dollars NZD
Tokelau TK New Zealand Dollars NZD
Australian AU Australian Dollars AUD
Christmas Island CX Australian Dollars AUD
Cocos (Keeling) Islands CC Australian Dollars AUD
Heard and Mc Donald Islands HM Australian Dollars AUD
alizahid / controllers.application.js
Last active December 28, 2017 12:37 — forked from 3gwebtrain/controllers.application.js
import Ember from 'ember'
export default Ember.Controller.extend({
appName: 'Twiddle',
selected: [],
actions: {
toggle(index) {
const indexOf = this.selected.indexOf(index)
alizahid / router.js
Last active January 25, 2017 05:40
New Twiddle
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none',
rootURL: config.rootURL
}); {
this.route('foo', {
alizahid / resizer
Last active October 1, 2018 18:17
Image resize and fix orientation in Java
private static Bitmap getImage(Context context, String name, int quality) throws IOException {
File file = new File(context.getExternalFilesDir(Environment.DIRECTORY_PICTURES), name);
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeFile(file.getAbsolutePath(), options);
float ratio = (float) options.outWidth / (float) options.outHeight;
alizahid /
Last active August 29, 2015 14:23
SMP Android logger
Iterator<String> logs = App.getLogManager().iterateRawLogData();
while (logs.hasNext()) {
alizahid /
Last active August 29, 2015 14:23
Google Play location API
package com.example;
import android.content.Context;
import android.os.Bundle;
public class Location implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {
alizahid / LoginActivity
Last active March 23, 2017 14:31
SMP 3.0 SMP07 Android registration and logout
public class LoginActivity extends Activity implements LogonCoreListener {
protected void onCreate(Bundle savedInstanceState) {
loadingSpinner = new LoadingSpinner(this);;
// get instance
dataJSON: [
"label": "One",
"children": [
"label": "Item 1",
"href": "#"
/* Daniel Ott
* entities.css
* 31 January 2011
* Adding arrows to thinks makes them more clickable. Right?
* Use CSS's :after pseudo-selector to insert hexadecimal values
* of html entities into the document. Less markup. More awesome.
.add-an-arrow:after {