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 / kubernetes.md
Last active November 12, 2022 11:56
Kubernetes Cheat Sheet

Kubernetes

Install

Prerequisites

  1. Bash v5+ checkout Upgrading Bash on macOS
  2. bash-completion@2

Install Docker and Kubernetes(k8s)

@berndverst
berndverst / VSCodeUserSettings.json
Last active April 6, 2024 00:14
VS Code: Override Terminal Colors with Solarized Dark regardless of Theme
{
"workbench.colorCustomizations": {
"terminal.foreground": "#839496",
"terminal.background": "#002833",
"terminal.ansiBlack": "#003541",
"terminal.ansiBlue": "#268bd2",
"terminal.ansiCyan": "#2aa198",
"terminal.ansiGreen": "#859901",
"terminal.ansiMagenta": "#d33682",
"terminal.ansiRed": "#dc322f",
@ariesmcrae
ariesmcrae / DBHelper.java
Created May 12, 2017 03:14
Amazon EC2 Systems Manager Parameter Store - get environment key/value pairs using AWS SDK Java
private static Map<String, String> parameterStore() {
final AWSSimpleSystemsManagement client = AWSSimpleSystemsManagementClientBuilder.defaultClient();
GetParametersRequest request = new GetParametersRequest();
request.withNames("driver", "host", "port", "schema", "username", "password").setWithDecryption(true);
GetParametersResult result = client.getParameters(request);
Map<String, String> store = new HashMap<>();
@yoyama
yoyama / Schema2CaseClass.scala
Created January 20, 2017 07:36
Generate case class from spark DataFrame/Dataset schema.
/**
* Generate Case class from DataFrame.schema
*
* val df:DataFrame = ...
*
* val s2cc = new Schema2CaseClass
* import s2cc.implicit._
*
* println(s2cc.schemaToCaseClass(df.schema, "MyClass"))
*
@ijokarumawak
ijokarumawak / 00.Realtime-Data-Visualization-with-Zeppelin-via-NiFi-WebSocket.md
Last active February 15, 2022 10:54
Example Zeppelin note book and NiFi flow.

Realtime Data Visualization with Zeppelin via NiFi WebSocket

This is an example realtime data visualization method using Zeppelin, NiFi and Kafka together.

Since NiFi 1.1.0, it provides components to act as a WebSocket server. This example contains a Zeppelin notebook paragraph which uses %angular interpreter to establish a WebSocket connection with NiFi, and draw a pie chart using D3, refreshed automatically as it received updated data from NiFi in realtime manner.

And also, a NiFi template to run a WebSocket server, which exposes latest data for the pie chart. The data can be passed through a Kafka topic.

@chriseth
chriseth / async.md
Last active December 26, 2023 09:13
Async Solidity Contracts

Having seen @pirapira's sketch of Bamboo ( https://github.com/pirapira/bamboo/ ), which proposed to add better control about the "smart contract program flow", even across calls, I thought that this should certainly be added to Solidity, and actually, it might even be possible now to a certain degree using inline assembly.

The problem is that with many functions in a contract, it is not always clear which can be called at which stage in the contract's lifetime. Certain smart contracts would be easier to understand if written as follows:

@graemerocher
graemerocher / BookController.groovy
Last active July 29, 2016 13:25
BookController that uses RxJava and RxGORM for MongoDB
package rxgorm.demo
import grails.artefact.Controller
import grails.rx.web.Rx
import grails.validation.ValidationException
import groovy.transform.CompileStatic
import static org.springframework.http.HttpStatus.*
import static grails.rx.web.Rx.*
import static rx.Observable.*
@StephenFluin
StephenFluin / main.ts
Created June 14, 2016 23:37
Try out the latest changes to forms in Angular 2.0.0-rc2
import {disableDeprecatedForms, provideForms} from '@angular/forms';
...
bootstrap(App, [
disableDeprecatedForms(),
provideForms(),
...
]);
@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
@willprice
willprice / README-opencv-3.1-raspberry-pi-installation.md
Last active May 14, 2021 08:24
How to install OpenCV 3.1 on Raspbian Jessie (Lite)

Installing OpenCV 3.1 on Raspbian Jessie

Prerequisites

  • Keep your system up to date:
    • $ sudo apt-get update
    • $ sudo apt-get upgrade
    • $ sudo reboot
  • Make sure you've got an internet connection.
  • Make sure you've got
  • wget