Skip to content

Instantly share code, notes, and snippets.

View hazdik's full-sized avatar
👑
Not Crewed, Just Crowned !!!

Dinakaran Arumairaj hazdik

👑
Not Crewed, Just Crowned !!!
View GitHub Profile
@hazdik
hazdik / ddbLocal.py
Created December 22, 2020 06:40 — forked from djg07/ddbLocal.py
import boto3
def main():
# 1 - Create Client
ddb = boto3.resource('dynamodb',
endpoint_url='http://localhost:8000',
region_name='dummy',
aws_access_key_id='dummy',
aws_secret_access_key='dummy')
# 2 - Create the Table
ddb.create_table(TableName='Transactions',
@hazdik
hazdik / .block
Created March 17, 2020 12:18 — forked from basilesimon/.block
Multiple line graph in v4 from JSON and draw()
license: mit
@hazdik
hazdik / .block
Created March 17, 2020 08:01 — forked from mbostock/.block
Multi-Series Line Chart
license: gpl-3.0
redirect: https://beta.observablehq.com/@mbostock/d3-multi-line-chart
@hazdik
hazdik / Readme.md
Created March 17, 2020 08:00 — forked from zischwartz/Readme.md
Responsive Multi-Line Chart (D3 V5)

Responsive Multi-Line Chart

@hazdik
hazdik / ASX.csv
Created March 4, 2020 12:47 — forked from drupal-spider/ASX.csv
D3.js Multi-line Chart with Brushing and Legends
Date Open High Low Close Volume Adj Close
2015-08-14 41.90 42.50 41.90 42.10 465400 42.10
2015-08-13 42.00 42.45 42.00 42.10 713800 42.10
2015-08-12 43.23 43.37 42.04 42.21 566100 42.21
2015-08-11 43.62 43.75 42.89 43.25 467900 43.25
2015-08-10 43.01 43.46 42.67 43.38 490100 43.38
2015-08-07 43.50 43.50 43.05 43.08 368600 43.08
2015-08-06 43.67 43.93 43.24 43.78 406000 43.78
2015-08-05 44.04 44.30 43.55 43.72 562900 43.72
2015-08-04 43.76 44.26 43.49 44.02 470600 44.02
@hazdik
hazdik / web-application-horizontal-layers.csv
Created March 2, 2020 06:20 — forked from LayZeeDK/web-application-horizontal-layers.csv
Horizontal layers of a web application.
Horizontal layer Examples
Business logic Application-specific logic, domain logic, validation rules
Persistence WebStorage, IndexedDB, WebSQL, HTTP, WebSocket, GraphQL, Firebase, Meteor
Messaging WebRTC, WebSocket, Push API, Server-Sent Events
I/O Web Bluetooth, WebUSB, NFC, camera, microphone, proximity sensor, ambient light sensor
Presentation DOM manipulation, event listeners, formatting
User interaction UI behaviour, form validation
State management Application state management, application-specific events
@hazdik
hazdik / rest-server.py
Created February 18, 2020 12:14 — forked from miguelgrinberg/rest-server.py
The code from my article on building RESTful web services with Python and the Flask microframework. See the article here: http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
#!flask/bin/python
from flask import Flask, jsonify, abort, request, make_response, url_for
from flask_httpauth import HTTPBasicAuth
app = Flask(__name__, static_url_path = "")
auth = HTTPBasicAuth()
@auth.get_password
def get_password(username):
if username == 'miguel':
@hazdik
hazdik / PushNotifications.php
Created December 30, 2019 11:04 — forked from joashp/PushNotifications.php
Simple PHP script to send Android Push Notification, iOS Push Notification and Windows Phone 8 Push Notification
<?php
// Server file
class PushNotifications {
// (Android)API access key from Google API's Console.
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI';
// (iOS) Private key's passphrase.
private static $passphrase = 'joashp';
// (Windows Phone 8) The name of our push channel.
private static $channelName = "joashp";
@hazdik
hazdik / couchdb-undelete.rb
Created December 24, 2019 07:04 — forked from vjt/couchdb-undelete.rb
Undeletes a document from a CouchDB database.
#!/usr/bin/env ruby
#
# Undelete a document from a CouchDB database.
#
# Recovers a previously deleted document by looking at the _changes
# feed, putting a new empty document preserving the revisions chain,
# retrieves the revs_info for the document, asks the user which one
# to recover, and puts back the old revision into place.
#
# For this to work, GETting the document must return error: "not_found",
@hazdik
hazdik / gauge.js
Created August 21, 2019 07:30 — forked from paulinm/gauge.js
A Google-style Gauge Implemented using D3 with Optional Min, Max, and Running Average Tracking
function Gauge(placeholderName, configuration)
{
this.placeholderName = placeholderName;
var minValue = null;
var maxValue = null;
var avgValue = null;
var avgCounter = 0;
var self = this; // for internal d3 functions