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
Set-WindowsExplorerOptions -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Enable-MicrosoftUpdate | |
Install-WindowsUpdate | |
Set-CornerNavigationOptions -EnableUsePowerShellOnWinX | |
Update-ExecutionPolicy |
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
# Initialized a mysql container and name it 'mysqldb' with a database name 'wordpress', and publish it under port 3306 | |
# The container uses the mysql images v5.7 | |
docker run --name mysqldb -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=wordpress -p 3306:3306 -d mysql:5.7 | |
# To create a different mysql user instead of the root (Note: you still need to specify root password) | |
docker run --name mysqldb -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=wordpress -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=wordpress -p 3306:3306 -d mysql:5.7 | |
# Run wordpress container and name it 'wordpress' and linking it with the mysql database (which named `mysqldb` previously) | |
docker run --name wordpress -e WORDPRESS_DB_PASSWORD=password -p 8080:80 --link mysqldb:mysql -d wordpress |
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
registry: | |
restart: always | |
image: registry:2 | |
expose: | |
- "5000" | |
environment: | |
- REGISTRY_HTTP_SECRET=<PUT SOME SECRET TEXT HERE> | |
volumes: | |
- ./config.yml:/etc/docker/registry/config.yml:ro | |
proxy: |
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
version: 0.1 | |
log: | |
fields: | |
service: registry | |
storage: | |
delete: | |
enabled: true | |
cache: | |
blobdescriptor: inmemory | |
azure: |
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
version: 0.1 | |
log: | |
fields: | |
service: registry | |
storage: | |
delete: | |
enabled: true | |
cache: | |
blobdescriptor: inmemory | |
filesystem: |
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
upstream docker-registry { | |
server registry:5000; | |
} | |
server { | |
listen 80; | |
server_name mydomain.com; | |
root /etc/nginx/html; | |
index index.html index.htm index.nginx-debian.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
require 'net/http' | |
# Temporary fix until https://github.com/erikhuda/thor/issues/538 closed | |
gem 'thor', '0.19.1' | |
# configuration | |
gem 'figaro' | |
# security | |
if yes?("Would you like to install Devise?") |
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 updateUrlParameter = function (uri, key, value) { | |
// remove the hash part before operating on the uri | |
var i = uri.indexOf('#'); | |
var hash = i === -1 ? '' : uri.substr(i); | |
uri = i === -1 ? uri : uri.substr(0, i); | |
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"); | |
var separator = uri.indexOf('?') !== -1 ? "&" : "?"; | |
if (!value) { |
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
/** | |
* Check if a String object is null or contain only spaces. | |
* | |
* @param s String object to check. | |
* @return TRUE if s is null or contain only spaces. FALSE if otherwise. | |
*/ | |
public static boolean isNullOrBlank(String s) { | |
return s == null || s.trim().length() == 0; | |
} |
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
function fish_prompt --description 'Write out the prompt' | |
# Just calculate these once, to save a few cycles when displaying the prompt | |
if not set -q __fish_prompt_hostname | |
set -g __fish_prompt_hostname (hostname|cut -d . -f 1) | |
end | |
if not set -q __fish_prompt_normal | |
set -g __fish_prompt_normal (set_color normal) | |
end |