Skip to content

Instantly share code, notes, and snippets.

View dannytranlx's full-sized avatar

Danny Tran dannytranlx

View GitHub Profile
### Keybase proof
I hereby claim:
* I am dannytranlx on github.
* I am dannytranlx (https://keybase.io/dannytranlx) on keybase.
* I have a public key ASCuGNk954laMdCNZ0-6sQyGigo-Jsti_7zzz4yTKcUCRgo
To claim this, I am signing this object:
@dannytranlx
dannytranlx / git_bible.md
Last active April 5, 2022 11:15 — forked from dmglab/git_bible.md
how to git

Note: this is a summary of different git workflows putting together to a small git bible. references are in between the text


How to branch

Try to keep your hacking out of the master and create feature branches. The [feature-branch workflow][4] is a good median between noobs (i have no idea how to branch) and git veterans (let's do some rocket science with git branches!). Everybody get the idea!

Basic usage examples

@dannytranlx
dannytranlx / timed-whispers.js
Created March 29, 2016 14:47
Timed whispers
Smooch.init({ appToken: ... });
// 2 minutes later
Smooch.on('ready', function() {
setTimeout(function() {
Smooch.track('shop-pants-2min');
}, 120000);
});
@dannytranlx
dannytranlx / checkout.liquid
Last active March 24, 2016 20:08
Whisper on a timer
// on checkout.liquid
<script>
setTimeout(function() {
Smooch.track('checkout-2mins');
}, 120000);
</script>
// for customText and email
// in snippets/smooch.liquid
var skPromise = Smooch.init({
// food
date: array
desc: string
// logs
@dannytranlx
dannytranlx / Acadox challenge.md
Last active December 26, 2015 16:09
One of my submissions to a challenge of IEEEXtreme 7.0

Acadox challenge

Acadox vision is to provide innovative and modern Learning Management technologies that empowers the faculty and students to engage and collaborate in a simple and efficient manner.

One of the professor, who loves Acadox so much, posted on his page as a teaser problem for his students to prepare for their programming exam. The problem posted was as follows:

Develop program that emulates a simple hexadecimal calculator that uses postfix notation. Perform the operations of addition, subtraction, logical and, logical or, logical not, and logical exclusive or.

Description

Since Acadox is social environment for learning. The professor posted the following description on his page: The programmer’s calculator accepts a string of hexadecimal digits and operators in reverse Polish (postfix) notation then produces the result. Input digits represent 16 bit unsigned binary bit strings.

System.out.println("To out-put All the request-attributes received from request - ");
Enumeration enAttr = request.getAttributeNames();
while(enAttr.hasMoreElements()){
String attributeName = (String)enAttr.nextElement();
System.out.println("Attribute Name - "+attributeName+", Value - "+(request.getAttribute(attributeName)).toString());
}
System.out.println("To out-put All the request parameters received from request - ");