Skip to content

Instantly share code, notes, and snippets.

View quickgrid's full-sized avatar

Asif Ahmed quickgrid

View GitHub Profile
@quickgrid
quickgrid / background.js
Created April 14, 2016 20:11
Simple chrome clock app using konva JS framework background JavaScript file
function launch(){
chrome.app.window.create('app.html',{
id: 'main',
'bounds': {
'width': 600,
'height': 600
},
minWidth: 600,
minHeight: 600,
maxWidth: 600,
@quickgrid
quickgrid / manifest.json
Created April 14, 2016 20:10
Simple chrome clock app using konva JS framework manifest file
{
"name": "Neon Clock",
"author": "Asif Ahmed",
"description": "A simple clock with date and time",
"version": "0.0.1",
"manifest_version": 2,
"app": {
"background": {
"scripts": ["background.js"]
}
@quickgrid
quickgrid / app.html
Created April 14, 2016 20:09
Simple chrome clock app using konva JS framework html file
<!DOCTYPE html>
<html>
<head>
<script src="js/konva.min.js"></script>
<meta charset="utf-8">
<meta name="author" content="Asif Ahmed">
<meta name="description" content="http://quickgrid.blogspot.com">
<title>Simple Chrome Clock App</title>
<style>
body {
@quickgrid
quickgrid / imdbMovieSearchRatingExtract.sh
Last active April 14, 2016 16:27
A linux bash shell script for searching imdb movies by name and download all relevant title ( movie ) pages. Then perform rating extraction on each of the pages and show in console.
#!/bin/bash
#===============================================================================#
# Author: Asif Ahmed #
# Version: 0.2 #
# Site: http://quickgrid.blogspot.com #
# Description: IMDB Movie Search and Rating Extraction #
# Note: This code is highly dependent on the current page structure or, #
# html design of IMDB. If it changes the code will break. #
#===============================================================================#
@quickgrid
quickgrid / kshapejs.js
Created April 9, 2016 19:50
KShapeJS library to extend features of konva JS framework
/*
* Author: Asif Ahmed
* Site: quickgrid.blogspot.com
* Description: kshapejs is a simple javascript library based on konvajs.
* It allow creating some basic shapes not defined in konva
* library.
*/
(function(window){
'use strict';
@quickgrid
quickgrid / sample.html
Last active October 5, 2018 02:44
Just a sample konva app to demonstrate kshapejs library.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Triangle Library Demo</title>
<style>
body {
margin: 0;
padding: 0;
@quickgrid
quickgrid / CmdArgumentsLister.sh
Created April 1, 2016 05:52
Bash code to list all the command line arguments.
#!/bin/bash
showargs(){
a=1
for i in $*
do
echo "The $a number arg is $i"
a=$(( $a + 1 ))
done
}
@quickgrid
quickgrid / ForLoopExample.sh
Created April 1, 2016 05:45
Bash for loop example.
#!/bin/bash
#I will print in loop
for (( i = 0; i < 5; i++ ))
do
echo "hello word"
done
@quickgrid
quickgrid / SwitchCaseExample.sh
Created April 1, 2016 05:42
Bash switch case example.
#!/bin/bash
#swich case code
echo "yes or no?"
read answer
case "$answer" in
@quickgrid
quickgrid / ExpressionEvaluation.sh
Created April 1, 2016 05:34
This just an example of expression evaluation different way. Also equality and even odd checking in a different way.
#!/bin/bash
# Do not use space before and after equal sign.
a=1
b=3
sum=`expr $a + $b`
sum=$(( $sum + 5 ))