Skip to content

Instantly share code, notes, and snippets.

View geetotes's full-sized avatar

Lee Gillentine geetotes

View GitHub Profile
@geetotes
geetotes / gist:5615765
Created May 20, 2013 21:35
CasperJS googler with Tubes.io parms
var links = [];
var casper = require("casper").create();
require('utils');
//this filter looks for external links
function isLinky(linky) {
var pattern = /^((http|https|ftp):\/\/)/;
if(pattern.test(linky))
return linky;
}
@geetotes
geetotes / resizeFiles.pl
Created March 26, 2014 19:11
Perl Subroutine for resizing images
#!/usr/bin/perl
use Image::Magick;
$imagePath = "../images/";
@sizes = ("480", "768", "992", "1200");
#reading sub, takes argument (filename)
sub resizeFiles {
@geetotes
geetotes / US State List
Last active August 29, 2018 05:01 — forked from tvpmb/US State List
JSON Array with List of US States with 2-char ISO codes.
[
{"name":"Alabama","alpha-2":"AL"},
{"name":"Alaska","alpha-2":"AK"},
{"name":"Arizona","alpha-2":"AZ"},
{"name":"Arkansas","alpha-2":"AR"},
{"name":"California","alpha-2":"CA"},
{"name":"Colorado","alpha-2":"CO"},
{"name":"Connecticut","alpha-2":"CT"},
{"name":"Delaware","alpha-2":"DE"},
{"name":"District of Columbia","alpha-2":"DC"},
class PrettyLoader extends React.Component {
constructor() {
this.state = {
loading: false
};
}
render() {
let loaderStyles = classNames({
'hidden': this.state.loading
});
class App extends React.Component {
render() {
return(
<div>
<PrettyLoader>
<Lies/>
</PrettyLoader>
<PrettyLoader>
<DamnedLies />
class PrettyLoader extends React.Component {
render() {
let loaderStyles = classNames({
'hidden': this.props.loading
});
return(
<div>
<div className={loaderStyles} />
{this.props.children}
class PrettyLoader extends React.Component {
constructor(props) {
super(props);
this.state = {
loading: false
};
this.setLoading = this.setLoading.bind(this);
}
componentDidMount() {
class Endpoints {
static login(auth_params) {
return {
method: 'POST',
endpoint: 'users/login',
loading_message: 'Loggin You In',
body: JSON.stringify(auth_params)
}
}
// More static methods that just return an object
class NeatoComponent extends React.Component {
render() {
// Guard clause
if (this.props.user === undefined) {
return null;
}
/*
* Actual render code here
*/
}