Skip to content

Instantly share code, notes, and snippets.

View solebox's full-sized avatar
🐼
I may be slow to respond.

jacob kili solebox

🐼
I may be slow to respond.
View GitHub Profile
@solebox
solebox / reactor.py
Last active August 29, 2015 14:16 — forked from jpanganiban/reactor.py
#!/usr/bin/env python
from gevent import monkey
monkey.patch_all() # Patch everything
import gevent
import time
class Hub(object):
"""A simple reactor hub... In async!"""
from fabric.api import *
# you've got to love them decorators :)
@parallel # dont have to be parallel , but might as well use it , wouldnt hurt with only 2 threads :)
@hosts('192.168.3.118', '192.168.6.142')
def pwd():
run('pwd')
#!/usr/bin/env ruby
require 'rye'
rbox = Rye::Box.new('my-server.com',
:user => 'user',
:password => 'asdA23')
puts rbox.pwd
[sole@solebox][~]% cat fabfile.py
#python code starts here
from fabric.api import run
def pwd():
run('pwd')
#this code must be ran from the commandline using the following command:
# fab pwd
class Rob
{
private int _lolcat;
public static void main(String[] arg){
Rob bob = new Rob(12);
}
public Rob(int num){
_lolcat = num;
}