Skip to content

Instantly share code, notes, and snippets.

View mii9000's full-sized avatar

ibrahim mii9000

View GitHub Profile
@mii9000
mii9000 / ideas.md
Last active August 29, 2015 14:28 — forked from tsaqib/ideas.md
Ideas that you can use for hackathons, competitions and research.

Ideas

I have collected and moderated these ideas from various public sources and put into one place so that problem solvers and solution developers may find inspirations. Because I wish to update it regularly, I have setup as a single page wiki. You may try these ideas on hackathons/competitions/research; some are quite intense problems and some are not. Many of the problems were prepared keeping Dhaka/Bangladesh in mind, but of course can be applied to just about any underdeveloped/developing and sometimes developed countries.

Categories:
  • Eradicate Extreme Poverty and Hunger
  • Education
  • Healthcare
  • Governance
@mii9000
mii9000 / gist:d5e6405233d749a3d5a2
Created October 23, 2015 17:27 — forked from dshookowsky/gist:6529765
Reader object to expando
private dynamic SqlDataReaderToExpando(DbDataReader reader)
{
var expandoObject = new ExpandoObject() as IDictionary<string, object>;
for (var i = 0; i < reader.FieldCount; i++)
expandoObject.Add(reader.GetName(i), reader[i]);
return expandoObject;
}
@mii9000
mii9000 / player.js
Created November 8, 2015 21:02 — forked from revolunet/player.js
basic nodejs mp3 player
var async = require('async');
var lame = require('lame');
var fs = require('fs');
var Speaker = require('speaker');
var volume = require("pcm-volume");
var audioOptions = {
channels: 2,
bitDepth: 16,
sampleRate: 44100,
@mii9000
mii9000 / README.md
Created May 11, 2016 10:31 — forked from aaronk6/README.md
launchUri

Cross-browser implementation of navigator.msLaunchUri

Microsoft’s navigator.msLaunchUri method only works in Internet Explorer on Windows 8. Therefore I came up with a (nearly) cross-browser implementation that uses the native msLaunchUri when it’s available and falls back to adventurous hacks when running in other browsers.

Description

launchUri (uri, successCallback, noHandlerCallback, unknownCallback)
@mii9000
mii9000 / 1_query_timestamp.js
Created May 12, 2016 07:40 — forked from katowulf/1_query_timestamp.js
Get only new items from Firebase
// assumes you add a timestamp field to each record (see Firebase.ServerValue.TIMESTAMP)
// pros: fast and done server-side (less bandwidth, faster response), simple
// cons: a few bytes on each record for the timestamp
var ref = new Firebase(...);
ref.orderByChild('timestamp').startAt(Date.now()).on('child_added', function(snapshot) {
console.log('new record', snap.key());
});
@mii9000
mii9000 / htmlentity.js
Created May 25, 2016 08:47 — forked from CatTail/htmlentity.js
Javascript: encode(decode) html text into html entity
// encode(decode) html text into html entity
var decodeHtmlEntity = function(str) {
return str.replace(/&#(\d+);/g, function(match, dec) {
return String.fromCharCode(dec);
});
};
var encodeHtmlEntity = function(str) {
var buf = [];
for (var i=str.length-1;i>=0;i--) {
@mii9000
mii9000 / Generic TypeScript Angular 1.X BaseController
Last active October 9, 2018 19:31 — forked from foyzulkarim/Generic TypeScript Angular 1.X BaseController
Generic TypeScript Angular 1.X Controller (Base+Child)
module App {
export class BaseController<T extends Entity> {
// my services
searchService: SearchService;
saveService: SaveService;
authService: AuthService;
url: UrlService;
// my variables
searchRequest: SearchRequest;
/*
Template
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/2.3.22/rx.all.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
@mii9000
mii9000 / annoying.js
Created February 9, 2017 08:16 — forked from Kilian/annoying.js
How to be an asshole
/**
* Annoying.js - How to be an asshole to your users
*
* DO NOT EVER, EVER USE THIS.
*
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com)
* Visit https://gist.github.com/767982 for more information and changelogs.
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors
*
@mii9000
mii9000 / japan-jobs.md
Created October 7, 2017 11:42 — forked from davidcalhoun/japan-jobs.md
Foreigner-friendly software companies in Japan