- have fun with them
- projections
- filters
- resource-keys
- scripting-gcloud
- gcloud alpha interactive
- https://medium.com/@Joachim8675309/getting-started-with-gcloud-sdk-part-1-114924737
- https://medium.com/@Joachim8675309/getting-started-with-gcloud-sdk-part-2-4d049a656f1a
- https://gist.github.com/bborysenko/97749fe0514b819a5a87611e6aea3db8
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
// poller.go | |
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"time" |
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
<!DOCTYPE html> | |
<!-- | |
Copyright 2012 Eric Bidelman | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
<!DOCTYPE html> | |
<!-- | |
Copyright 2012 Eric Bidelman | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
/** | |
* Get a random floating point number between `min` and `max`. | |
* | |
* @param {number} min - min number | |
* @param {number} max - max number | |
* @return {number} a random floating point number | |
*/ | |
function getRandomFloat(min, max) { | |
return Math.random() * (max - min) + min; | |
} |
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
#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` |
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
ticketApp.directive('focusElement', function($timeout) { | |
return { | |
restrict: 'A', | |
scope: { | |
focusElement: '@', | |
focusDelay: '@' | |
}, | |
link: function($scope, $element, $attrs) { | |
$scope.$focusElement = angular.isDefined($scope.focusElement) ? $($scope.focusElement): $element; |
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
module.exports = { | |
get: function (req, res) { | |
res.sendfile(req.path.substr(1)); | |
}, | |
_config: { | |
rest: false, | |
shortcuts: false | |
} | |
}; |
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
//note: http://www.html-js.com/article/1961 | |
// Function to download file using wget | |
var download_file_wget = function(file_url) { | |
// extract the file name | |
var file_name = url.parse(file_url).pathname.split('/').pop(); | |
// compose the wget command | |
var wget = 'wget -P ' + DOWNLOAD_DIR + ' ' + file_url; | |
// excute wget using child_process' exec function |
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
// Pattern | |
//Usually, you call a callback as the last thing you do inside a function. | |
//You might consider it synonymous with return, only JavaScript does | |
//not halt function execution when it hits it. It can be easy to accidentally | |
//let execution continue after calling a callback, when you really expected it to end. | |
//In order to make this easy to spot, and make sure execution stops in the way you expect, | |
//I recommend returning the callback function call. | |
// wrong! |
NewerOlder