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
| package easyget | |
| import ( | |
| "io" | |
| "io/ioutil" | |
| "net/http" | |
| ) | |
| // Define Request struct | |
| type Request struct { |
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
| const lookupTaxRate = (region) => { | |
| if(region == '') { | |
| throw 'Region can\'t be blank!' | |
| } | |
| var taxRate = 0.5 | |
| if(region == 'Chiang Mai') { |
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
| *** Settings *** | |
| Library Selenium2Library | |
| *** Variables *** | |
| ${url} https://medium.com/@nottyo/ | |
| @{chrome_arguments} --disable-infobars --headless --disable-gpu | |
| ${page_text} Test Automation Engineer. Let’s make awesome tests | |
| ${timeout} 10s | |
| *** Test Cases *** |
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 input = "'Warehouse','Local Release','Local Release DA'"; | |
| var regex = /'(.*?)'/g; | |
| var matches, output = []; | |
| while (matches = regex.exec(input)) { | |
| output.push(matches[1]); | |
| } |
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
| const removeTag = (html) => { | |
| html = html.replace(/(\r\n|\n|\r)/g,"").replace(/>\s+</g, "><"); | |
| return html | |
| } |
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 str = "The quick brown fox jumped over the box like an ox with a sox in its mouth"; | |
| str.match(/\w(ox)/g); // ["fox", "box", "sox"] | |
| // match (when used with a 'g' flag) returns an Array with all matches found | |
| // if you don't use the 'g' flag then it acts the same as the 'exec' method. | |
| str.match(/\w(ox)/); // ["fox", "ox"] | |
| /\w(ox)/.exec(str); // ["fox", "ox"] |
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
| // (c) 2017 Yami Odymel | |
| // This code is licensed under MIT license. | |
| package main | |
| import ( | |
| "fmt" | |
| "html" | |
| "strconv" | |
| ) |
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
| local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" | |
| #function git_prompt_info() { | |
| # ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
| # echo "$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX$(parse_git_dirty)" | |
| #} | |
| function get_pwd(){ | |
| git_root=$PWD | |
| while [[ $git_root != / && ! -e $git_root/.git ]]; do |
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
| myfuncion() { mv $1 $2; } |
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
| export GOPATH="${PWD}" | |
| { | |
| "go.gopath": "${workspaceRoot}" | |
| } |