Skip to content

Instantly share code, notes, and snippets.

View soham2008xyz's full-sized avatar
👨‍💻
Sprint-mode ON!

Soham Banerjee soham2008xyz

👨‍💻
Sprint-mode ON!
View GitHub Profile
@soham2008xyz
soham2008xyz / CSS Gooey Menu (Version 4).markdown
Created October 11, 2015 20:26
CSS Gooey Menu (Version 4)
@soham2008xyz
soham2008xyz / CSS Gooey Menu (Version 2).markdown
Created October 11, 2015 20:26
CSS Gooey Menu (Version 2)
@soham2008xyz
soham2008xyz / designer.html
Last active October 19, 2015 16:28
designer
<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">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="my-element">
<template>
<style>
@soham2008xyz
soham2008xyz / Angular Material Design Starter App.markdown
Created October 19, 2015 16:58
Angular Material Design Starter App
@soham2008xyz
soham2008xyz / 10_XMLMail.java
Last active November 25, 2015 18:43
XML Assignment
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.io.File;
import java.io.FileWriter;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;
@soham2008xyz
soham2008xyz / 10_array.pl
Last active November 25, 2015 18:43
Perl Assignment
#!/usr/bin/env perl
%our_friends = ('best', 'Don', 'good', 'Robert', 'worst', 'Joe');
$good_friend = $our_friends{'good'};
print "I have a good friend named $good_friend.\n";
@soham2008xyz
soham2008xyz / getUrlParameter.js
Created November 23, 2015 17:09
Get URL parameters in Javascript
function getUrlParameter(sParam) {
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
@soham2008xyz
soham2008xyz / xmlToJson.js
Created November 23, 2015 17:10
Convert XML to JSON objects
// Changes XML to JSON
function xmlToJson(xml) {
// Create the return object
var obj = {};
if (xml.nodeType == 1) { // element
// do attributes
if (xml.attributes.length > 0) {
obj["@attributes"] = {};
@soham2008xyz
soham2008xyz / .editorconfig
Created December 19, 2015 12:37
EditorConfig file for HTML/CSS/JS
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
@soham2008xyz
soham2008xyz / jquery.smooth-scroll.js
Created January 2, 2016 18:48
jQuery smooth scroll to anchor link
$(document).ready(function(){
$('a[href*=#]:not([href=#])').on('click',function (e) {
e.preventDefault();
var target = this.hash;
var $target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top
}, 900, 'swing', function () {