Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
function downloadString(text, fileType, fileName) { | |
var blob = new Blob([text], { type: fileType }); | |
var a = document.createElement('a'); | |
a.download = fileName; | |
a.href = URL.createObjectURL(blob); | |
a.dataset.downloadurl = [fileType, a.download, a.href].join(':'); | |
a.style.display = "none"; | |
document.body.appendChild(a); | |
a.click(); |
#!/usr/bin/env bash | |
# Create a page in the current dir | |
echo "My Test Page" > test.html | |
# Start server | |
python -m SimpleHTTPServer 8000 &> /dev/null & | |
pid=$! | |
# Give server time to start up |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
docker logs nginx 2>&1 | grep "127." | |
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container |
For each machine running xmodmap
will give you the mapping and keycode, take a look first then write the script. I use ubuntu and mac keyboard. The below maps both left and right control and super.
Create an .Xmodmap file in your Linux home directory, with the following contents, then execute xmodmap .Xmodmap
clear control
clear mod4
keycode 37 = Super_L
keycode 105 = Super_R
All you have to do, to extend your trial period, is change number in TrialKey element in application.xml. This file is located in /Library/Application Support/Adobe/Adobe Photoshop/AMT. You can navigate there with this command:
cd /Library/Application\ Support/Adobe/Adobe\ Photoshop\ */AMT
Then you have to open the file and edit it. You can use just TextEdit app.
open -a TextEdit application.xml
version: '3' | |
services: | |
lb: | |
build: | |
context: ./nginx | |
dockerfile: Dockerfile | |
ports: | |
- "9090:9090" | |
depends_on: | |
- service1 |