Skip to content

Instantly share code, notes, and snippets.

@rahatarmanahmed
rahatarmanahmed / Movies I saw in 2013
Last active August 29, 2015 14:16
Lost my original file of this, but recovered them from my Google Tasks list. ** is best movie i saw that year, * are movies I recommend.
**Oldboy (2003)
*50/50
*Adaptation
*Argo
*Dark City
*Django Unchained
*Donnie Darko
*Eternal Sunshine of a Spotless Mind
*eXistenZ
*Four Lions
@rahatarmanahmed
rahatarmanahmed / Movies I saw in 2014
Created March 3, 2015 06:55
** is best movie i saw that year, * are movies I recommend.
**Boyhood
*22 Jump Street
*A Separation
*About Elly
*About time
*Before Midnight
*Bottle Rocket
*City of God
*Ernest & Celestine
@rahatarmanahmed
rahatarmanahmed / HalfLife.js
Last active August 29, 2015 14:18
HalfLife.js
const HOW_MANY_HALF_LIVES = 3;
switch(HOW_MANY_HALF_LIVES)
{
case 1: console.log("I guess it truly was.... a half-life..."); break;
case 2: console.log("Isn't it actually a full life?"); break;
case 3: console.log("Nice try idiot, how can you have more than 2 half lives that doesn't even make sense.... dumbass"); break;
default: ValveTime.defer(function(){
console.log("TOO BE CONFIRMED")
});

I hereby claim:

  • I am rahatarmanahmed on github.
  • I am rahat (https://keybase.io/rahat) on keybase.
  • I have a public key whose fingerprint is 0C5F C6C8 2C1C 2335 F0DE FC59 6C3C 6FFC C15B 349F

To claim this, I am signing this object:

{
##javascript in Freenode
<bamboozle> ljharb, maybe i need a queue of some kind then
<kLoooa2> Do you realize that basically after age 20 your body starts rotting, being worse and worser at everything? and that includes your brain too? you will eventually be stupid and naive just like children. or worse - you can get alzheimer's disease. If you are alive now, I guarantee you that you will die eventually. And it can be really painful dying. Just read news or statistics how many people die in what ways DAILY. You will become one of them event
<kLoooa2> ually. One of that statistics number. nothing more.
* rcyr plays violin for stupid people being offtopic.
<boogyman> kLoooa2: ##chat is more appropriate for non-JS related topics
<ljharb> kLoooa2: congrats on stating some pretty mild and unsurprising facts that every human should know already.
<kLoooa2> ljharb: if they know, how they live?
<ljharb> pretty easily
@rahatarmanahmed
rahatarmanahmed / gist:6a226e67495b1432585e
Created July 5, 2015 16:58
Darths & Droids EZ reader
// Makes it so clicking on the current comic loads the next one. Also updates the URL so you can go back and forward.
var e = document.querySelector('body > div.center > p:nth-child(2) > img');
e.addEventListener('click', function() {
var next = function(n) { var s = '0000' + (++n); return s.substr(s.length - 4); };
window.history.pushState({n: this.src.match(/\d{4}/)[0].replace(/\d{4}/, next)}, 'idk', window.location.href.replace(/\d{4}/, next));
this.src = this.src.replace(/\d{4}/, next);
});
window.onpopstate = function(ev) {
e.src = e.src.replace(/\d{4}/, ev.state.n);
console.log(ev);
@rahatarmanahmed
rahatarmanahmed / config.json
Created July 29, 2015 23:04
Test Squelch config.json
{
"servers": [
{
"server": "irc.esper.net",
"port": 6667,
"nick": "SquelchTester",
"username": "SquelchTester",
"realname": "SquelchTester",
"channels": ["#kellyirc", "#aaa", "#bbb", "#ccc"],
"ssl": false,
@rahatarmanahmed
rahatarmanahmed / formio_auth.js
Last active September 17, 2015 23:01 — forked from randallknutson/gist:58da47fad0035de19a28
Authentication Example.
var request = require('request');
request.post(
'https://formio.form.io/app/api/user/login/submission',
{
data: {
'user.email': email,
'user.password': password
}
},
@rahatarmanahmed
rahatarmanahmed / formio-project-user-auth.js
Last active September 18, 2015 15:23 — forked from zackurben/gist:51ee9b92c26ad8a7c290
User Authentication Example
var request = require('request');
request.post(
'https://{projectname}.form.io/{loginform}/submission',
{
data: {
'{userresource}.{emailfield}': email,
'{userresource}.{passwordfield}': password
}
},
var request = require('request');
request(
{
url: 'https://{projectname}.form.io/{resourcename}/submission',
method: 'POST',
headers: {
'x-jwt-token': token
},
form: {