Skip to content

Instantly share code, notes, and snippets.

🔮
doing some magic

Vajahath Ahmed vajahath

Block or report user

Report or block vajahath

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View successful-operation.md

successful-operation polymer custom element

A UI element that can be used to indicate that the operation was successful.

(version: 1.0.5.)

Just use

<successful-operation></successful-operation>

to show up the above element.

View hello-world-mytest polymer custom element.md

Here is how to get started

visit npm package

Setup Polymer

You need Polymer base files to use this component.

  1. Install Bower if you don't have : sudo npm install -g bower.
  2. Download Polymer using bower: bower install Polymer/polymer.
@vajahath
vajahath / npmQTest.js
Created Apr 24, 2016
Node promise example with then() using npm q module
View npmQTest.js
// require q lib
var q = require('q');
// function deininitions
function sayone(){
var d = q.defer();
// function that takes time to finish
setTimeout(function(){
console.log("sayone is called");
View install sublime text 3 from tarball.sh
wget https://download.sublimetext.com/sublime_text_3_build_3103_x64.tar.bz2
tar xjf sublime_text_3_build_3103_x64.tar.bz2
./configure
make
sudo make install
@vajahath
vajahath / Package Control.sublime-settings
Created Mar 3, 2016
package Control.sublime-settings
View Package Control.sublime-settings
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"1337 Color Scheme",
"All Autocomplete",
"AngularJS",
@vajahath
vajahath / settings-user
Last active Mar 3, 2016
mySublime settings-user
View settings-user
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_scheme": "Packages/User/SublimeLinter/1337 (SL).tmTheme",
"font_size": 15,
"ignored_packages":
[
"Arduino-like IDE",
"CSSComb",
"jQuery",
@vajahath
vajahath / gist:e9ec0b6c530b07269465
Created Mar 2, 2016 — forked from kitek/gist:1579117
NodeJS create md5 hash from string
View gist:e9ec0b6c530b07269465
var data = "do shash'owania";
var crypto = require('crypto');
crypto.createHash('md5').update(data).digest("hex");
@vajahath
vajahath / js-code-reuse.js
Last active Feb 27, 2016
reusable js code and reference
View js-code-reuse.js
/**
* @file Javascript Code Reference
* @author vajuoff.1@gmail.com
*/
// create model file for mongoose model
// =========================================BEGIN
/**
* @file Describes the 'user' model for generating mongoose schema.
* @author Vajahath
@vajahath
vajahath / index.ejs
Created Feb 25, 2016
jquery > post an object. Stringification is important!
View index.ejs
$.ajax({
type: 'POST',
url: 'http://localhost:3000/auth/google/authCodeHandler',
contentType: 'application/json; charset=utf-8',
success: function (result) {
// Handle or verify the server response.
console.log(result);
},
processData: false,
data: JSON.stringify({code: authResult['code']})
View hello.html
<!DOCTYPE html>
<html ng-app="myModule">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>hello world</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script type="text/javascript" src="sj.js"></script>
<style>
You can’t perform that action at this time.