This gist is no longer in use.
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/sh | |
| # Setup encrypted disk image | |
| # For Ubuntu 14.04 LTS | |
| CRYPTFS_ROOT=/cryptfs | |
| apt-get update | |
| apt-get -y upgrade | |
| apt-get -y install cryptsetup |
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
| # Run Application specific setup tasks here! | |
| #!/usr/bin/env bash | |
| cd /vagrant | |
| fig run web foreman run rake db:create | |
| fig run web foreman run rake db:migrate |
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
| # -*- coding: utf-8 -*- | |
| from bs4 import BeautifulSoup | |
| import requests | |
| username = '' ###账号### | |
| password = '' ###密码### | |
| login_url = 'http://v2ex.com/signin' ###如V2EX设置了使用 SSL,必须改 https### | |
| index_url = 'http://v2ex.com' ###同上### | |
| mission_url = 'http://www.v2ex.com/mission/daily' ###同上### | |
| UA = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) \ |
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
| --- | |
| # Data needed for Class['openstack::compute'] | |
| # The IP and interface that external sources will use to communicate with the instance and hypervisors. | |
| openstack::compute::public_interface: 'eth0' | |
| openstack::compute::internal_address: "%{ipaddress_eth0}" | |
| openstack::compute::iscsi_ip_address: "%{ipaddress_eth0}" | |
| # The interface that will handle instance to intance communication and instance outbound traffic. | |
| openstack::compute::private_interface: 'eth1' |
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
| // A very basic web server in node.js | |
| // Stolen from: Node.js for Front-End Developers by Garann Means (p. 9-10) | |
| var port = 8000; | |
| var serverUrl = "127.0.0.1"; | |
| var http = require("http"); | |
| var path = require("path"); | |
| var fs = require("fs"); | |
| var checkMimeType = true; |