#!/bin/bash
# Ask the user for login details
read -p 'Username: ' uservar
read -sp 'Password: ' passvar
echo
echo Thankyou $uservar we now have your login details
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
#!/bin/bash | |
# Ask the user for login details | |
# https://www.cloudbooklet.com/attach-and-mount-disks-to-vm-instance-in-google-cloud/ | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
lsblk | |
read -p 'INPUT the new DEVICE_ID: ' deviceId | |
read -p 'INPUT dir name at /mnt: ' dirName |
Reference from https://cg2010studio.com/2016/07/09/ios-自製發版本系統/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
#https://www.jfrog.com/confluence/display/RTF/Installing+with+Docker
docker pull docker.bintray.io/jfrog/artifactory-oss:latest
#From version 6.2, the Artifactory Nginx Docker container starts and runs as user nginx. Note that:
docker run --name artifactory -d \
-p 8081:8081 \
-e EXTRA_JAVA_OPTIONS='-Xms512m -Xmx2g -Xss256k -XX:+UseG1GC' \
-v /var/opt/jfrog/artifactory:/var/opt/jfrog/artifactory \
docker.bintray.io/jfrog/artifactory-oss:latest
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
# for google cloud compute + centos + ansible remote | |
# | |
# ansible-playbook execute command | |
# ansible -i inventory.ini -m ping --key-file ~/.ssh/key hostname | |
# for multi project | |
# ansible -i inventory.ini -m ping --key-file ~/.ssh/key groupname | |
# | |
# ansible-playbook -i inventory.ini --key-file=~/.ssh/key reinstallUrllib3.yml --extra-vars "target=hostname" | |
# ansible-playbook -i inventory.ini --key-file=~/.ssh/key reinstallUrllib3.yml --extra-vars "target=groupname" | |
# |
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
plugins { | |
id 'java' | |
id 'idea' | |
id 'eclipse' | |
id "org.springframework.boot" version "2.1.4.RELEASE" | |
id "io.spring.dependency-management" version "1.0.7.RELEASE" | |
id "io.franzbecker.gradle-lombok" version "3.0.0" | |
id "nu.studer.jooq" version "3.0.3" | |
} |
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
# https://xianyou.wordpress.com/2017/04/14/macos-sierra-disable-mouse-acceleration-with-steelseries-exactmouse/ | |
defaults write .GlobalPreferences com.apple.mouse.scaling -1 |
ajax post with json
$.ajax("api url",{
type: 'post',
dataType: 'json',
contentType: "application/json; charset=utf-8",
data: JSON.stringify({data1: 'data1', data2: 'data2'}),
}).done(function (result) {
alert(result.message);
doneFunction();
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
# reference : https://tech.labs.oliverwyman.com/blog/2018/05/08/setting-up-drone-io-ci/ | |
# reference : https://medium.com/asiayo-engineering/%E7%94%A8-drone-%E6%89%93%E9%80%A0-ci-cd-flow-36b9d14c7620 | |
version: '2' | |
services: | |
drone-server: | |
image: drone/drone:0.8 | |
ports: | |
- 80:8000 | |
- 443:443 |