Skip to content

Instantly share code, notes, and snippets.

View xmlking's full-sized avatar
🌝
Write code that will last longer than You

Sumanth Chinthagunta xmlking

🌝
Write code that will last longer than You
View GitHub Profile
@xmlking
xmlking / docker-compose.yml
Last active March 24, 2023 01:12
cassandra healthcheck and dependency for docker compose
version: '2.1'
services:
cassandra:
image: cassandra:latest
networks:
- reactive-network
volumes:
- cassandra_data:/var/lib/cassandra
# - ${PWD}/data/cassandra/data:/var/lib/cassandra
@xmlking
xmlking / install-sdkman.sh
Created March 21, 2017 00:11
clean install sdkman
#!/usr/bin/env bash
set -e
rm -rf ~/.gvm
rm -rf ~/.sdkman
curl -s get.sdkman.io | bash
echo sdkman_auto_answer=true > ~/.sdkman/etc/config
@xmlking
xmlking / index.html
Last active July 19, 2025 18:30
web-bluetooth demo with Polar H7 Heart Rate Monitor *** need Chrome v54 ***
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
<script src="script.js"></script>
</head>
<body>
<div class='hr-table'>
<div class='hr-row'>
<div class='hr-cell'>
<div class='hr-header'>Heart Rate:</div>
@xmlking
xmlking / TodosService.ts
Created May 28, 2016 16:22
Observable - Observer
import { Http } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { Observer } from 'rxjs/Observer';
import 'rxjs/add/operator/share';
import { Todo } from 'app/interfaces';
export class TodosService {
todos$: Observable<Todo[]>;
private _todosObserver: Observer<Todo[]>;
private _dataStore: {
@xmlking
xmlking / nifi-twitter.groovy
Last active June 1, 2016 21:48
Example script for Apache NiFi's ExecuteScript Processor using @grab Ref: http://funnifi.blogspot.com/2016/05/using-groovy-grab-with-executescript.html . Set dynamic properties for ExecuteScript with your twitter consumerKey, consumerSecret accessToken and secretToken
@Grab('org.codehaus.groovy.modules.http-builder:http-builder:0.7')
@Grab('oauth.signpost:signpost-core:1.2.1.2')
@Grab('oauth.signpost:signpost-commonshttp4:1.2.1.2')
import groovy.json.JsonOutput
import groovyx.net.http.RESTClient
import static groovyx.net.http.ContentType.*
import org.apache.http.params.HttpConnectionParams
import com.crossbusiness.nifi.processors.NiFiUtils as util
@xmlking
xmlking / README.md
Created May 13, 2016 17:51 — forked from johnlindquist/README.md
Angular 2 Wikipedia Image Search

Angular2 Starter Gist Run

@xmlking
xmlking / server.js
Created October 25, 2015 23:30
Koa 2.0.0 supports ES2016 async/await
import Koa from 'koa';
const app = new Koa();
// x-response-time
app.use(async (ctx, next) => {
var start = new Date;
await next();
const ms = new Date - start;
ctx.set('X-Response-Time', ms + 'ms');
@xmlking
xmlking / README.md
Last active September 21, 2015 21:50
Amazon Dash Button triggering Auth0's `webtask` to send text message when button is pressed.

Node-Dash-Button-Webtasks

Simple demo showcasing IoT and Auto0's Webtask integration.

npm install wt-cli -g

wt create send_text.js --name send_text -s TWILIO_ACCOUNT_SID=aaaa -s TWILIO_AUTH_TOKEN=aaa -s TWILIO_NUMBER=+15005550006
@xmlking
xmlking / info.md
Created September 4, 2015 23:59
installing angular-new-router with JSPM without pulling unnecessary dependencies

How to install angular-new-router with JSPM without pulling unnecessary dependencies into jspm.config.js:

 jspm install npm:angular-new-router -o '{"main": "dist/router.es5", "format": "es6",  "dependencies": {"jspm:angular": "^1.4.5"}, "shim": { "dist/router.es5": {"deps": ["angular"]} } }'

Change Angular version if you are different version. with shim it also makesure angular is loaded before angular-new-router

@xmlking
xmlking / test.html
Last active August 29, 2015 14:26
Demonstrate streaming JSON data parsing with OboeJS lib. Client consuming streaming REST endpoint implemented using NodeJS/RxJava/Ratpack etc and -chunked transfer- encoding
<html>
<head>
<title>OboeJS demo</title>
<script src="https://rawgit.com/jimhigson/oboe.js/v2.1.2/dist/oboe-browser.min.js"></script>
</head>
<body>
<div ></div>
<ul id="content">
<li>AUD_CAD:</li>
</ul>