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
| [luna@localhost workbox]$ mkdir reverse_proxy | |
| [luna@localhost workbox]$ cd reverse_proxy/ | |
| [luna@localhost reverse_proxy]$ mkdir centos7 centos6 | |
| [luna@localhost reverse_proxy]$ cd centos6/ | |
| [luna@localhost centos6]$ vagrant init centos6.64 | |
| A `Vagrantfile` has been placed in this directory. You are now | |
| ready to `vagrant up` your first virtual environment! Please read | |
| the comments in the Vagrantfile as well as documentation on |
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 | |
| rm logs/* | |
| rm cplogs/* | |
| rm /var/lib/logrotate.status | |
| cp /home/vagrant/test /home/vagrant/logs/testlog | |
| touch -d '2015/5/20 00:00:00' /home/vagrant/logs/testlog | |
| date --set="2015/5/20 01:00" | |
| logrotate /etc/logrotate.conf |
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: "2" | |
| services: | |
| openvpn: | |
| image: kylemanna/openvpn | |
| volumes: | |
| - "~/openvpn:/etc/openvpn" | |
| ports: | |
| - "9995:1194/udp" | |
| cap_add: | |
| - NET_ADMIN |
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
| module VagrantPlugins | |
| module GuestLinux | |
| class Plugin < Vagrant.plugin("2") | |
| guest_capability("linux", "change_host_name") { Cap::ChangeHostName } | |
| guest_capability("linux", "configure_networks") { Cap::ConfigureNetworks } | |
| end | |
| end | |
| end | |
| Vagrant.configure(2) do |config| |
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
| <?php | |
| $data = array( | |
| 'f&oo'=>'bar', | |
| 'baz'=>'bo/om', | |
| 'php'=>'hypertext processor' | |
| ); | |
| $data = http_build_query($data, "", "&"); |
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
| package main | |
| import ( | |
| "encoding/csv" | |
| "fmt" | |
| "os" | |
| "strconv" | |
| ) | |
| // Order 取引 |
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
| package main | |
| import ( | |
| "encoding/csv" | |
| "fmt" | |
| "os" | |
| "strconv" | |
| ) | |
| // Order 取引 |
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
| tes |
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
| package main | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "os" | |
| "strings" | |
| "github.com/PuerkitoBio/goquery" | |
| ) |
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
| docker run --rm -v "$PWD":/src -w /src python python test.py | |
| {'name': 'Tom', 'age': 12} | |
| {'name': 'Tom', 'age': 12} |