FridayHug.com http://fridayhug.com
The Smallest Rails App http://thesmallestrailsapp.com
%w(action_controller/railtie coderay).each &method(:require)| <?xml version="1.0" ?> | |
| <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> | |
| <service_bundle type="manifest" name="export"> | |
| <service name="network/openvpn" type="service" version="0"> | |
| <create_default_instance enabled="true"/> | |
| <single_instance/> | |
| <dependency name="fs" grouping="require_all" restart_on="none" type="service"> | |
| <service_fmri value="svc:/system/filesystem/local"/> | |
| </dependency> | |
| <dependency name="net" grouping="require_all" restart_on="none" type="service"> |
| # 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL | |
| # 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew | |
| # https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers | |
| # 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it | |
| gem install bundler | |
| # 1. Get edge Rails source (master branch) | |
| git clone https://github.com/rails/rails.git |
FridayHug.com http://fridayhug.com
The Smallest Rails App http://thesmallestrailsapp.com
%w(action_controller/railtie coderay).each &method(:require)| # /etc/network/interfaces | |
| # | |
| auto lo | |
| iface lo inet loopback | |
| # device: eth0 | |
| iface eth0 inet manual | |
| # IPv4 bridge | |
| # (connect ONLY your firewall/router KVM instance here, this is the WAN device!) |
| # Licensed under CC BY 3.0 http://creativecommons.org/licenses/by/3.0/ | |
| # Derived works must attribute https://gist.github.com/4492300 at the beginning, and the date. | |
| ################################################################## | |
| Installing and Configuring SmartOS on a budget server (with a /29) | |
| ################################################################## | |
| # if you find this gist useful, please star it | |
| # please be aware that budget hosting companies usually cut corners somewhere, |
| // gcc grab.c -o grab -lX11 | |
| // ugly hack to catch windows key before application and change i3 workspace if windows+[0-9] is pressed | |
| // usage: grab winid_1 winid_2 ... | |
| // example: | |
| // grab `xwininfo -root -tree -int |grep " - Oracle VM VirtualBox" | awk '{print $1}'` | |
| #include <X11/X.h> | |
| #include <X11/Xlib.h> |
| class Player | |
| def initialize | |
| @max_health = 20 | |
| @last_health = @max_health | |
| @taking_damage = false | |
| @directions = [:backward, :forward] | |
| @current_direction = :forward | |
| @reached_wall = false | |
| end | |
I recently had the following problem:
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
| #!/bin/bash -e | |
| #sudo apt-get -y install realpath man2html-base | |
| #gem install ronn | |
| #git clone git@github.com:joyent/illumos-joyent.git | |
| #git clone git@github.com:joyent/smartos-live.git | |
| pushd illumos-joyent | |
| git pull | |
| popd | |
| pushd smartos-live | |
| git pull |
| var _missing= function(data){ return React.DOM.pre(null, "Route not found: "+ data.route) }, | |
| _router= null, | |
| _started= false, | |
| _nextId= 1; | |
| function handleRouteChange(container, component) { | |
| var routeParams= Array.prototype.slice.call( arguments, 1 ) | |
| React.renderComponent( | |
| component({ routeParams:routeParams }, null), | |
| container |