Skip to content

Instantly share code, notes, and snippets.

Avatar

Abhishek Hingnikar darkyen

View GitHub Profile
@darkyen
darkyen / tokenizer.js
Created Nov 9, 2012
Tokenizer for creating JavaScript objects from NLP Tree Parse from opennlp or stanford parser
View tokenizer.js
function Tokenize(str){
// something to keep track of parens nesting
var current = {};
if(str){
if( str[0] == '(')
str = str.substr(1,str.length-2);
var raw = str.split(' ');
current.name = raw.shift();
current.body = [];
str = raw.join(" ");
View jsMp3
var fs = require('fs');
var Buffer = require('buffer').Buffer;
// Mp3Id3Reader
// Supports Id3v2.3.0 fully
// TODO: Add id3v2.2.0
// TODO: Add id3v2.4.0
var id3Reader = function(){
View jsMp3
var fs = require('fs');
var Buffer = require('buffer').Buffer;
// Mp3Id3Reader
// Supports Id3v2.3.0 fully
// TODO: Add id3v2.2.0
// TODO: Add id3v2.4.0
var id3Reader = function(){
View jsMp3dec.js
var fs = require('fs');
var Buffer = require('buffer').Buffer;
// Mp3Id3Reader
// Supports Id3v2.3.0 fully
// TODO: Add id3v2.2.0
// TODO: Add id3v2.4.0
var id3Reader = function(){
@darkyen
darkyen / jsMp3dec.js
Last active May 2, 2019
A javascript based decoder for mp3 frame parsing supports id3
View jsMp3dec.js
/*
var net = require('net');
var http = require('http');
var listeners = [];
var Meta = {};
var streamer = http.createServer(function(req,res){
res.write('ICY 200 OK\r\nicy-notice1:<BR>FUCK OFF <BR>icy-notice2:SHOUTcast Distributed Network Audio Server/posix v1.2.3<BR>icy-name:'+Meta.name+'\r\nicy-genre:'+Meta.genre+'\r\nicy-url:'+Meta.url+'\r\nContent-Type:audio/mpeg\r\nicy-pub:1\r\nicy-br:'+Meta.br+'\r\nicy-metaint:8192\r\n\r\n');
listeners.push(res);
});
@darkyen
darkyen / Base 64
Created Jan 14, 2013
Base 64 of an image for andresilva
View Base 64
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbgAAAGaCAYAAAB9rlaOAAAgAElEQVR4nOydv47ryJXGPy2cjGGDvJhJPLBB3mQmJC8m2knIxqRjiJNsMIl4kw02Ie++gKgH2JU6dSJ24mCTZsOxQeoBFqLCnUQUdmAnOxCFNdYhN+g5dYsUJVH/WqL6/AAB3RJZLBar6mPVOXWqUxRFAYZhGIa5Mf7h0hlgGIZhmHPAAscwDMPcJCxwDMMwzE3CAscwDMPcJCxwDMMwzE3yi7ovR6MRPnz48NJ5uUo0TYOu6wedq+v6weeqqgrTNF/83Fsnz3Okabr2t0yWZciy7KD0qexd19347LMsg+/7yPP8oGvcEpes57ZtH3wu04wkSda+29TummLbduO+tVO3TMC2bUwmk4MzwLQfRVGOFslLCG2aprXC8dL1eTwew3Xd2t+CIMBgMHjR/DCnxbKso9M4hcC+tEhvevmT291LtDXP8zAajXYeVzuCY5jVanWSivr09HSC3LSPQ0eATDs4Rds4RRqv9UWp6QiQBY5hDqBuhJvnOWaz2YVyxDBMlZ0CZxhGo6Egcxrq5qyZl6Nubr/pfH+SJLi7uxN/N6Xf7++RQ+YYNk1hMy9Dndlikymjbvq10+kAOOEITlVVNsa+IFzWr48gCC6dBYZpFavVqtFxtcsEjvFwYZjXivwWuq0NsX2OYQ5D0zTxd5N2VCtwTdWRYZiPqKoq/t7WhljgGOYwZFPBwQLHMMzxsK2HYS7LToHjBcMMcxhNpvrlKReGYZrTxJFrp8DJ0y4Mw5yWQyPdMAyzG56iZJgTYhiG+JttbQxzWuQXwiYmgLMu9M7zfG0Nne/7pVFhlmUIw7D2GPrNcRwxVUqhYvZxp69zw7Zt+2CXfBoa0/lBEJTSo/vZFKrpEOi+6QHXlcGpyjJNU6RpKjroJm7sNB1XN6Ut571qJKZrAdgav7EtVOv2paiGVDomLmpbeI33/NqQn2cjb/+iBgDi0+/36w
@darkyen
darkyen / index.html
Created Jun 28, 2013
A CodePen by Abhishek Hingnikar.
View index.html
<link href='http://fonts.googleapis.com/css?family=Ubuntu:300,400' rel='stylesheet' type='text/css'>
<nav id="main-nav">
</nav>
<div id="main-map" class="map-container"></div>
<div id="campaign" class="widget accordion">
<div class="page">
<header>Project X</header>
<div class="content">
View designer.html
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
View designer.html
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@darkyen
darkyen / WindowsPITA.md
Last active Aug 29, 2015
I have had tons of issues with npm and windows fighting each other... So solved it with a simple solution
View WindowsPITA.md

Windows PITA

Microsoft Windows may or may not be an incredible OS, but lets face it its supported widely. Except for if you are a developer. Things go worse when you are working with the super awesome (arguable) Node.JS, where NPM the most magical install everything tool along with its teammates like node-gyp and bower & ofcourse yeoman aims to grunt out your problems and gulp your issues when you are trying to bootstrap a project or finding a dependencies..... except for one thing the WINDOWS FILE SYSTEM.

The biggest problem is resolving cyclic dependencies, which windows i don't know why just fails. First it was hanged in a state where i can't read or write from modules where pathname is too long, now the