A collection of docker online resources. Source
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
#!env bash | |
doInstallServer(){ | |
if [[ -e /etc/redhat-release ]]; then | |
RELEASE_RPM=$(rpm -qf /etc/centos-release) | |
RELEASE=$(rpm -q --qf '%{VERSION}' ${RELEASE_RPM}) | |
if [ ${RELEASE} != "7" ]; then | |
echo "Bukan CentOS Release 7." | |
exit 1 | |
fi | |
else |
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
server { | |
server_name www.abc.com; | |
return 301 $scheme://abc.com$request_uri; | |
} | |
server { | |
listen 80; | |
server_name abc.com; |
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
# For more information on configuration, see: | |
# * Official English Documentation: http://nginx.org/en/docs/ | |
# * Official Russian Documentation: http://nginx.org/ru/docs/ | |
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log; | |
pid /run/nginx.pid; | |
events { |
Dumping ground for Links
- https://gist.github.com/cjthomp/1455c39d4a14292676ea
- https://www.agvision.ro/building-api-starter-pack-laravel/
- https://deliciousbrains.com/react-laravel-lumen-company-status-board/
- http://mguimaraes.co/creating-a-fully-testable-books-review-app-from-the-ground-with-laravel-part-1/
- http://www.programmerfort.com/php-code-optimization-tips-and-tricks/
- http://blog.pisyek.com/create-room-booking-system-laravel-fullcalendar/
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
if ($request_uri = /) { | |
set $test A; | |
} | |
if ($host ~* teambox.com) { | |
set $test "${test}B"; | |
} | |
if ($http_cookie !~* "auth_token") { | |
set $test "${test}C"; |
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
# | |
# Working with branches | |
# | |
# Get the current branch name (not so useful in itself, but used in | |
# other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" |
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
function transfer | |
if test (count $argv) -eq 0 | |
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md" | |
return 1 | |
end | |
## get temporarily filename, output is written to this file show progress can be showed | |
set tmpfile ( mktemp -t transferXXX ) | |
## upload stdin or file |
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
#!/bin/sh | |
# Tiny Github deployment bash script | |
# @author José Luis Quintana <quintana.io> | |
# @datetime 2016-10-22 | |
# Settings | |
REPO_PATH=username/repo-name | |
DEPLOY_PATH=/deploy/path/on/my/server |
The docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root and other users can only access it using sudo. The docker daemon always runs as the root user. If you don’t want to use sudo when you use the docker command, create a Unix group called docker and add users to it. When the docker daemon starts, it makes the ownership of the Unix socket read/writable by the docker group.
- Add the docker group if it doesn't already exist:
sudo groupadd docker
NewerOlder