- Project (Drupal) is served on
/var/www/html
in the Vagrant box - Local project files location:
c:\Users\username\Work\projects\my-project\repo\html
- Guest machine IP is 10.0.2.2 (if this doesn't work, run
route -nee
in the VM and look for the gateway address)
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 | |
readonly SCRIPT=$(basename "$0") | |
readonly VERSION='1.0.0' | |
readonly AUTHOR='[email protected]' | |
readonly SOURCE='https://gist.github.com/xykong/6efdb1ed57535d18cb63aa8e20da3f4b' | |
# For script running robust | |
set -o nounset # to exit when your script tries to use undeclared variables | |
set -o errexit # to make your script exit when a command fails |
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 http = angular.element(document.body).injector().get('$http'); | |
var sectionScope = angular.element($('tbody').get(0)).scope() | |
http.get(sectionScope.apiCall + '?limit=10000').then((res) => { | |
console.log(`Received ${res.data.length} testers...`); | |
var text = ''; | |
for (const tester of res.data) { | |
text += `${tester.firstName},${tester.lastName},${tester.email}\n`; | |
} | |
var a = document.createElement("a"); |
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/bash | |
# This script deletes all local branches which has been fully merged | |
# with $master_branch and optionally from remote/origin too. | |
master_branch=master | |
current_branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') | |
if [ "$current_branch" != "$master_branch" ]; then | |
printf "ERROR: You are on branch $current_branch, NOT $master_branch." | |
exit | |
fi |