Skip to content

Instantly share code, notes, and snippets.


Abhishek Hingnikar darkyen

View GitHub Profile
ralt / gist:f4bd9e9133dee42e36a6
Last active April 16, 2018 19:30
The Contributors Army
View gist:f4bd9e9133dee42e36a6

tl;dr we're lazy, we're coders.

Let's make use of that.

  • We don't like to start off new projects and write all the booooring boilerplate
  • We like to fiddle with code and fix it
  • We like recognition
  • We're quickly bored

Hence, I present to you my idea:

Zirak / gist:3086939
Last active August 27, 2022 22:01
xhr for dummies
View gist:3086939

So, you want to send a motherfucking XMLHttpRequest (XHR, or commonly and falsly known as AJAX.) Too bad, just ran out of motherfucking XMLHttpRequests; but I still have one regular. XHR is not magic. It does not autofuckinmagically send things the way you want them do be sent. It does not do the thinking for you. It just sends an Http Request.

You get a hold on such a prime beast like this:

darkyen / Id3NodeReader.js
Created April 24, 2012 17:23
A simple ID3v2.3.0 Tag Reader written for node.js
View Id3NodeReader.js
var fs = require('fs');
var Buffer = require('buffer').Buffer;
var id3Reader = new (function(){
// Credits to esailja //
var self = this;
function id3Size( buffer ) {
var integer = ( ( buffer[0] & 0x7F ) << 21 ) |
( ( buffer[1] & 0x7F ) << 14 ) |
( ( buffer[2] & 0x7F ) << 7 ) |