Skip to content

Instantly share code, notes, and snippets.

View vajahath's full-sized avatar
👨‍🚀
Distorting spacetime continuum

Vajahath Ahmed vajahath

👨‍🚀
Distorting spacetime continuum
View GitHub Profile
@vajahath
vajahath / designer.html
Last active August 29, 2015 14:23
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-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@vajahath
vajahath / client.html
Last active August 29, 2015 14:26 — forked from diorahman/client.html
Ajax, call jQuery POST to node.js expressjs
<html>
<head>
<title>jsonp test</title>
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(function()
{
$('#select_link').click(function(e){
e.preventDefault();
console.log('select_link clicked');
@vajahath
vajahath / filterPrime.java
Last active September 30, 2015 15:02
Java Program to FILTER PRIMES
//to filter primes
import java.io.*;
import java.util.*;
class FilterPrime
{
int n;
FilterPrime(Scanner scan)
{
System.out.print("Enter Limit Here:");
@vajahath
vajahath / test.java
Last active September 30, 2015 15:11
Java Program that Uses Command Line Arguments.
class Comandln
{
public static void main(String []args)
{
int i,c;
int l=args.length;
String str;
for(i=0;i<l;i++)
{
@vajahath
vajahath / index.ejs
Last active September 30, 2015 16:10
How to pass variables to res.render() in Node.js
<html>
.
.
<title> <%= title %> </title>
.
.
<% include ../partial/header.ejs %>
.
.
</html>
@vajahath
vajahath / header.ejs
Created September 30, 2015 16:07
How to pass variables to res.render() in Node.js
<header>
.
.
<p>logged in status: <%= status %> </p>
.
.
</header>
@vajahath
vajahath / app.js
Created September 30, 2015 16:09
How to pass variables to res.render() in Node.js
.
.
.
app.get('/', function(req, res)
{
// not working :(
res.render('index', {
"status":"loggedin",
"title":"home"
});
@vajahath
vajahath / reset.css
Created October 15, 2015 00:47
CSS Reset
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
<!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>
@vajahath
vajahath / index.ejs
Created February 25, 2016 15:25
jquery > post an object. Stringification is important!
$.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']})