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
class Rob | |
{ | |
private int _lolcat; | |
public static void main(String[] arg){ | |
Rob bob = new Rob(12); | |
} | |
public Rob(int num){ | |
_lolcat = num; | |
} |
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
[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 |
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
#!/usr/bin/env ruby | |
require 'rye' | |
rbox = Rye::Box.new('my-server.com', | |
:user => 'user', | |
:password => 'asdA23') | |
puts rbox.pwd | |
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
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') |
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
#!/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!""" |
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
#!/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 |
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
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 { |
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
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, |
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
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) { |
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
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) { |
OlderNewer