Make the most of your talents and develop products that can create an impact on a national scale. We are an in-house software team, assembled to move with speed and deliver with quality.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Asking user input into the cli | |
Then(/^I enter the sms otp$/) do | |
print "Enter the otp digit within 30 seconds?" | |
otp = STDIN.gets | |
wait_for_keyboard | |
keyboard_enter_text otp | |
sleep(STEP_PAUSE) | |
end |
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm run pre-build && npm run build_logic && npm run post_build && npm run exit | |
// `&&` for sequential execution | |
// `&` for parrallel execution | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if var topController = UIApplication.shared.keyWindow?.rootViewController { | |
while let presentedViewController = topController.presentedViewController { | |
topController = presentedViewController | |
} | |
// topController should now be your topmost view controller | |
// Dismissing an UIAlertController which is being displayed and setting the topController down one level | |
if topController is UIAlertController { | |
if let vc = topController.presentingViewController { | |
topController = vc | |
vc.dismiss(animated: true, completion: nil) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Test script for testing a full sweep of a servo. This is to get the minimum and the maximum degree of the angle. | |
*/ | |
Cylon.robot({ | |
name: 'Servo1', | |
connections: { | |
arduino: { adaptor: 'firmata', port: '/dev/ttyACM0' } // hard-coded serial port address | |
}, |
I hereby claim:
- I am hongkheng on github.
- I am wbakura (https://keybase.io/wbakura) on keybase.
- I have a public key whose fingerprint is D3BB 665E 70FD DED8 9D34 5DE3 C464 4096 407C 70C3
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.surface { | |
transform: translate3d(0,0,y); | |
backface-visibility: hidden; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Moving average | |
// v(t) = a * V(t) + (1-a)*v(t-1) | |
// http://scrollerjs.com/talks/velocity2014/#1 | |
function moveStep () { // triggered every 17ms~ | |
var v = (currentPos - prevPos) / (currentTime - prevTime); // current velocity | |
self.velocity = 0.6 * v + 0.4 * self.velocity; // Applying moving average formmula | |
self.translate(self.x, self.y); // debounce move event from animation | |
requestAnimationFrame(moveStep); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var timeoutId = 0; | |
$('#myElement').mousedown(function() { | |
timeoutId = setTimeout(myFunction, 1000); | |
}).bind('mouseup mouseleave', function() { | |
clearTimeout(timeoutId); | |
}); |