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
while true;do sleep 1; echo 0 > /sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinklight/brightness;sleep 1;echo 1 > /sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinklight/brightness;done; |
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
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; | |
} |
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/perl | |
use Image::Magick; | |
$imagePath = "../images/"; | |
@sizes = ("480", "768", "992", "1200"); | |
#reading sub, takes argument (filename) | |
sub resizeFiles { |
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
[ | |
{"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"}, |
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 PrettyLoader extends React.Component { | |
constructor() { | |
this.state = { | |
loading: false | |
}; | |
} | |
render() { | |
let loaderStyles = classNames({ | |
'hidden': this.state.loading | |
}); |
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 App extends React.Component { | |
render() { | |
return( | |
<div> | |
<PrettyLoader> | |
<Lies/> | |
</PrettyLoader> | |
<PrettyLoader> | |
<DamnedLies /> |
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 PrettyLoader extends React.Component { | |
render() { | |
let loaderStyles = classNames({ | |
'hidden': this.props.loading | |
}); | |
return( | |
<div> | |
<div className={loaderStyles} /> | |
{this.props.children} |
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 PrettyLoader extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
loading: false | |
}; | |
this.setLoading = this.setLoading.bind(this); | |
} | |
componentDidMount() { |
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 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 |
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 NeatoComponent extends React.Component { | |
render() { | |
// Guard clause | |
if (this.props.user === undefined) { | |
return null; | |
} | |
/* | |
* Actual render code here | |
*/ | |
} |
OlderNewer