Skip to content

Instantly share code, notes, and snippets.

View darkyen's full-sized avatar

Abhishek Hingnikar darkyen

View GitHub Profile
<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;
<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 August 29, 2015 14:08
I have had tons of issues with npm and windows fighting each other... So solved it with a simple solution

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

@darkyen
darkyen / My computer.md
Last active August 29, 2015 14:10
My PITA Computer

#MY computer is broken again

Hey room my computer is messed up sigh, Again ! Its been wierd since a few days but now its being totally ridiculous. Problems I am facing are :

  • Chrome starting literally after 5 minutes of clicking, I have nuked it and re-installed everything
  • Dropbox not starting at all.
  • uTorrent not starting at all.
  • All the non starting programs show up in the task manager with 6-8 MB Ram usage and 0 CPU usage as if they are waiting for some asynchronous operation to complete
  • Group Policy Client Service is not starting cause MUP.SYS isn't being recognized ( Most of programs log this in the system log as cause of their failure ). (This could be that asynchronous operation)
@darkyen
darkyen / network.js
Created December 23, 2014 13:39
NetworkService for Hipster Delorean
var reqwest = require('reqwest');
var _ = require('lodash');
var Promise = require('bluebird');
class Network{
constructor(defs){
this._httpMethods = ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'];
@darkyen
darkyen / foo.md
Last active August 29, 2015 14:12
Proposal For College

What am I doing ?

In India the education system is more about "learning by heart" then is it by "understanding concepts". As A student I have always felt this and have been frustrated about it, Hence I want to try a few changes in my own college.

Since learning by heart is definitely not going to work for computer science by far, I thought it would be a better option to learn by doing common work flows and let them have hands on or let them make what we define as side projects and learn things that book don't teach but are cool to use. (This is purely

@darkyen
darkyen / post.md
Last active August 29, 2015 14:12
Why I am not on Facebook

I left facebook primarily last year while working at meta rain the pauses were weeks then months and finally I have got myself over Facebook completely and once and for all. And honestly it has been one of the best decisions in my life.

Why

  1. Whatsapp : Now I see a point why Facebook did buy whatsapp, since I have joined whatsapp back 2013 my messaging has reduced drastically from the Facebook to Whatsapp. Mostly because its straightforward and simple, The way it should be.
var banks = {
SBI: 'SBI',
HDFC: 'HDFC'
};
var transactionTypes = {
MONEY_TRANSFER: 'MONEY_TRANSFER',
CARD: 'CARD',
NETBANKING: 'NETBANKING'
@darkyen
darkyen / test.js
Last active August 29, 2015 14:15
A tale of Caches
// Lazy instance pool uncle.
var _instancePool = {
length: 0,
maxLength: 100,
// Keep all the nodes in memory.
elements: {
},
reset: function(){
@darkyen
darkyen / cc.py
Created February 26, 2015 08:32
Python script to detect credit card on plain background.
# Basic trickkk
import cv2;
import numpy as np;
def rectify(h):
h = h.reshape((4,2))
hnew = np.zeros((4,2),dtype = np.float32)
add = h.sum(1)