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
class Rob
{
private int _lolcat;
public static void main(String[] arg){
Rob bob = new Rob(12);
}
public Rob(int num){
_lolcat = num;
}
[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
#!/usr/bin/env ruby
require 'rye'
rbox = Rye::Box.new('my-server.com',
:user => 'user',
:password => 'asdA23')
puts rbox.pwd
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')
@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!"""
#!/usr/bin/python
class Cow(object):
"""
the cow needs to have 1 stomach with 4
sections!
(but here we only have one for simplicity)
"""
def __init__(self,stomach): # <- here we injected out stomach dependency
#into the cow class
import React from "react";
import Title from "./Slider/Title";
import { fetchThumbs } from "../actions/thumbActions";
import { connect } from "react-redux";
import Thumbnail from "./Slider/Thumbnail";
import _ from "lodash";
@connect((store) => {
return {
import React from "react";
import Title from "./Slider/Title";
import { fetchThumbs } from "../actions/thumbActions";
import { connect } from "react-redux";
import Thumbnail from "./Slider/Thumbnail";
@connect((store) => {
return {
user: store.user,
import React from "react";
import Title from "./Slider/Title";
import { fetchThumbs } from "../actions/thumbActions";
import { addLayer } from "../actions/layerActions";
import { connect } from "react-redux";
import Thumbnail from "./Slider/Thumbnail";
export default class Slider extends React.Component {
constructor(props) {
import React from "react";
import Title from "./Slider/Title";
import { fetchThumbs } from "../actions/thumbActions";
import { addLayer } from "../actions/layerActions";
import { connect } from "react-redux";
import Thumbnail from "./Slider/Thumbnail";
export default class Slider extends React.Component {
constructor(props) {