Skip to content

Instantly share code, notes, and snippets.

View darkyen's full-sized avatar

Abhishek Hingnikar darkyen

View GitHub Profile
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (process){
'use strict';
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _plivo = require('plivo');
var _plivo2 = _interopRequireDefault(_plivo);
const Express = require('express');
const request = require('request-promise');
const Twitter = require('twit@2.2.3');
const Webtask = require('webtask-tools');
const jwt = require('jsonwebtoken');
const app = Express();
// A Much better approach which demonstrates API Auth is at
// https://github.com/vikasjayaram/twitter-status-webtask
@darkyen
darkyen / tsconfig.json
Created December 27, 2016 15:46
Problem, everything gets compiled, files not even required.
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": false,
"sourceMap": true,
"alwaysStrict": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"jsx": "react"
@darkyen
darkyen / Id3NodeReader.js
Created April 24, 2012 17:23
A simple ID3v2.3.0 Tag Reader written for node.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 ) |
@darkyen
darkyen / decoder.cpp
Created July 12, 2012 13:13
C++ ffmpeg decoder
/*
* encoder.cpp
*
* Created on: Jul 12, 2012
* Author : Abhishek Hingnikar
* @TODO: remove the file deps.
* ADD STREAM DEPS so that u can buffer output.
* Structure
* @JSAPI
* ffmpeg{
@darkyen
darkyen / project.c
Created July 27, 2012 17:26
C Project
#include<conio.h>
#include<stdio.h>
#include<graphics.h>
#include<dos.h>
/*
***************************************************************************
* Programmer : Abhishek Hingnikar *
* AIM : Mobile Shop Management System in C *
***************************************************************************
*/
@darkyen
darkyen / jsMp3dec.js
Last active January 13, 2023 02:36
A javascript based decoder for mp3 frame parsing supports id3
/*
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 / gist:120c46739985ebf3b39b
Created June 10, 2015 03:40
Ferengi Rules of Acquisition [Complete List*]
1 "Once you have their money, you never give it back." "The Nagus" (DS9 episode)
2 "The best deal is the one that makes the most profit." The 34th Rule (DS9 novel)
3 "Never spend more for an acquisition than you have to." "The Maquis, Part II" (DS9 episode)
4 "A woman wearing clothes is like a man in the kitchen." The Ferengi Rules of Acquisition (DS9 novel)
5 "Always exaggerate your estimates." Cold Fusion (SCE novel)
6 "Never let family stand in the way of opportunity." "The Nagus" (DS9 episode)
7 "Always keep your ears open." "In the Hands of the Prophets" (DS9 episode)
8 "Small print leads to large risk." The Ferengi Rules of Acquisition (DS9 novel)
9 "Instinct, plus opportunity, equals profit." "The Storyteller" (DS9 episode)
10 "Greed is eternal." "Prophet Motive" (VOY episode)