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
alias latest='function _latest(){ curl -s "https://rubygems.org/api/v1/versions/$1/latest.json" | cut -d"\"" -f 4 };_latest' |
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
@implementation GLQueryTableViewController | |
- (instancetype)initWithStyle:(UITableViewStyle)style localDatastoreTag:(NSString *)tag { | |
self.localDatastoreTag = tag; | |
return [self initWithStyle:style className:nil]; | |
} | |
- (void)loadObjects:(NSInteger)page clear:(BOOL)clear { | |
NSAssert(!self.paginationEnabled, @"GLQueryTableViewController can not be used with pagination enabled."); | |
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
window = UIWindow(frame: UIScreen.mainScreen().bounds) | |
if let window = window { | |
window.backgroundColor = UIColor.whiteColor() | |
window.rootViewController = UIViewController() | |
window.makeKeyAndVisible() | |
} |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
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
#!/bin/bash | |
# | |
# bash script to run yesod-dev's auto reload inside ghci (faster template reloading) | |
# | |
# see also https://github.com/yesodweb/yesod/issues/754 | |
# | |
# needs tmux and fswatch, tested on MacOS 10.10 | |
# |
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
# Elixir has pipes `|>`. Let's try to implement those in Ruby. | |
# | |
# I want to write this: | |
# | |
# email.body | RemoveSignature | HighlightMentions | :html_safe | |
# | |
# instead of: | |
# | |
# HighlightMentions.call(RemoveSignature.call(email.body)).html_safe | |
# |
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
#!/bin/sh | |
set -e | |
set -x | |
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
do | |
npm -g install "$package" | |
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
FROM atlashealth/ruby:2.1.2 | |
ENV DEBIAN_FRONTEND noninteractive | |
# Install any dependencies needed by Rails | |
RUN apt-get update -q && \ | |
apt-get install -qy curl libpq-dev libqt4-dev xvfb imagemagick --no-install-recommends && \ | |
# install Node for asset minification | |
curl -sL https://deb.nodesource.com/setup | bash - && \ |
NewerOlder