Skip to content

Instantly share code, notes, and snippets.

David Luu daluu

Block or report user

Report or block daluu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@daluu
daluu / notes.txt
Created Jul 27, 2019
Docker notes
View notes.txt
docker system prune --volumes
docker run -u`id -u`:`id -g` -v $(pwd):/user/project -v ~/.aws:/user/.aws -v ~/.npmrc:/user/.npmrc -w /user/project -it --entrypoint /bin/bash circleci/node:12
@daluu
daluu / custom_rf_docker_image_notes.txt
Created Apr 7, 2019
Notes for building custom Robot Framework docker images
View custom_rf_docker_image_notes.txt
Below are various notes to help if building a custom RF docker image that we don't already have publicly available,
e.g. IronPython-based RF docker image, Java/Jython-based RF docker image.
java -jar jython_installer-<version>.jar
# Robot Framework 3.0 supports Jython 2.7 which requires Java 7 or newer.
jython -m ensurepip
jython -m pip install robotframework
@daluu
daluu / gist:8636544d77e7371d7b9460037a5cd0dd
Created Mar 15, 2019 — forked from dmitshur/gist:6927554
How to `go get` private repos using SSH key auth instead of password auth.
View gist:8636544d77e7371d7b9460037a5cd0dd
$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
@daluu
daluu / notes.md
Last active Jul 27, 2019
git and github notes
View notes.md
@daluu
daluu / gonotes.txt
Last active Oct 24, 2018
golang notes/tips
View gonotes.txt
alternate registry to fetch packages outside of go get: https://gopm.io/download?pkgname=golang.org/x/oauth2
alternate web sandbox for go: https://goplay.space/
https://medium.com/@nate510/don-t-use-go-s-default-http-client-4804cb19f779
https://github.com/beyondns/gotips
http://moazzam-khan.com/blog/golang-make-http-requests/
@daluu
daluu / d3.legend.js
Last active Nov 23, 2018 — forked from bunkat/index.html
Sample trendline and linear, polynomial, exponential, logarithmic, and power regression analysis using regression.js
View d3.legend.js
// d3.legend.js
// (C) 2012 ziggy.jonsson.nyc@gmail.com
// MIT licence
(function() {
d3.legend = function(g) {
g.each(function() {
var g= d3.select(this),
items = {},
svg = d3.select(g.property("nearestViewportElement")),
@daluu
daluu / gist:4bdb5b0d78e5dc206c706d6819157d64
Created May 22, 2016 — forked from log0ymxm/gist:4752760
Some work graphing a few probability distributions using d3.js
View gist:4bdb5b0d78e5dc206c706d6819157d64
var probability = {
normal: function(x, mean, stddev) {
var y = (1 / (stddev * Math.sqrt(2 * Math.PI))) * Math.pow(Math.E, - (Math.pow(x - mean, 2) / (2 * Math.pow(stddev, 2))));
//console.log('normal', x, mean, stddev, y);
return y;
},
logNormal: function(x, mean, stddev) {
var y = (1 / (x * Math.sqrt(2 * Math.PI * Math.pow(stddev, 2)))) * Math.pow(Math.E, - (Math.pow(Math.log(x) - mean, 2) / (2 * Math.pow(stddev, 2))));
//console.log('logNormal', x, mean, stddev, y);
y = isFinite(y) ? y : 0;
@daluu
daluu / README.md
Last active May 11, 2016
Custom/additional maven repos to get some not so common maven hosted JARs
View README.md

Just an example for others and a note for myself in case I need to reference this in the future.

Steps:

Add the custom/additional maven repos where you can find the JARs (that are not hosted on maven central or other common repo)

<repositories>
   <!-- has some useful JARs not hosted on maven central, a popular alternative repo -->
   <repository>
@daluu
daluu / read_apache_storm_config_and_bolt_init_and_process_sample.js
Last active Oct 31, 2018
Sample bolt showing how to initialize a bolt and read in Apache Storm topology configuration and process tuple in node.js and how to unit test it
View read_apache_storm_config_and_bolt_init_and_process_sample.js
#! /usr/bin/env node
'use strict';
var storm = require("pathTo/storm.js"); //the official storm multilang node client/binding from Apache Storm project
var BasicBolt = storm.BasicBolt;
TestBolt.prototype = Object.create(BasicBolt.prototype);
TestBolt.prototype.constructor = TestBolt;
function TestBolt() {
You can’t perform that action at this time.