A list of angular modules (work in progress EVER)
This file contains hidden or 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
# | |
# Copy the `configuration.js` file by environment | |
# | |
# How to use | |
# | |
# $ cd <your-sunbets-project> | |
# $ copy-config (-p|--password) (--user) (-u--url) <(-au|--au)=true (-eu|--eu)=true (-uat|--uat)=true> (-d|--dir=www-sunbets-folder) | |
# | |
# Examples: | |
# copy-config --user="my-user" -p="my-password" -uat=true |
This file contains hidden or 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
# | |
# Run the e2e tests for tab | |
# | |
# How to use | |
# | |
# $ cd <your-tab-project> | |
# $ e2e-tab (-n|--no-link) (-w|--web-parts=web-parts-folder) (-d|--dir=www-tab-folder) | |
# | |
# Optional values | |
# |
This file contains hidden or 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
# Load ".cli" folder content | |
if [ -d ~/.cli ]; then | |
CLI_FILES=$(find ~/.cli -maxdepth 2 -type f) | |
while read -r line; do | |
source $line | |
done <<< "$CLI_FILES" | |
fi |
This file contains hidden or 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 request = require('request'); | |
var five = require('johnny-five'); | |
var board = new five.Board(); | |
var CONFIG = { | |
LED: { | |
SUCCESS: 12, | |
ERROR: 10 | |
}, | |
CI_CCTRACKER_URL: 'https://snap-ci.com/willmendesneto/generator-reactor/branch/master/cctray.xml', |
This file contains hidden or 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
'use strict'; | |
/** | |
* Multiple credentials check with Basic Auth node package | |
* | |
* How to use (ExpresJS example): | |
* | |
* var BASIC_AUTH = [ | |
* { | |
* name: process.env.BASIC_AUTH_USERNAME, |
This file contains hidden or 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
'use strict'; | |
var ScreenshotReporter = require('./screenshots.js'); | |
var path = require('path'); | |
exports.config = { | |
seleniumAddress: 'http://0.0.0.0:4444/wd/hub', | |
// Do not start a Selenium Standalone sever - only run this using chrome. | |
chromeOnly: true, | |
chromeDriver: '../../node_modules/protractor/selenium/chromedriver', |
// In your controller
this.item = {
userType: ''
};
<!-- In your html template -->
This file contains hidden or 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
// An example configuration file. | |
exports.config = { | |
// Do not start a Selenium Standalone sever - only run this using chrome. | |
chromeOnly: true, | |
chromeDriver: './node_modules/protractor/selenium/chromedriver', | |
seleniumAddress: 'http://0.0.0.0:4444/wd/hub', | |
baseUrl: 'http://0.0.0.0:9000', | |
// Capabilities to be passed to the webdriver instance. |
This file contains hidden or 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
# Simple calculator | |
function calc() { | |
local result=""; | |
result="$(printf "scale=10;$*\n" | bc --mathlib | tr -d '\\\n')"; | |
# └─ default (when `--mathlib` is used) is 20 | |
# | |
if [[ "$result" == *.* ]]; then | |
# improve the output for decimal numbers | |
printf "$result" | | |
sed -e 's/^\./0./' `# add "0" for cases like ".5"` \ |