Skip to content

Instantly share code, notes, and snippets.

@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@mtei
mtei / helix_keyboard_build_tool_memo.md
Last active August 24, 2023 08:19
キーボード自作、特に Helix キーボードキットの製作に最低必要な工具のメモ
@cbetta
cbetta / alias.sh
Last active August 29, 2015 14:26
Get the latest version of a gem
alias latest='function _latest(){ curl -s "https://rubygems.org/api/v1/versions/$1/latest.json" | cut -d"\"" -f 4 };_latest'
@hhanesand
hhanesand / gist:3747430b18d12c94fffe
Created March 27, 2015 02:28
PFQueryTableViewController subclass
@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.");
@l4u
l4u / gist:9440f62bb3ed0bb880a6
Last active January 24, 2023 04:24
Create a UIWindow programmatically without using storyboards in swift
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.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@maerten
maerten / run-yesod-ghci.sh
Last active August 29, 2015 14:07
bash script to run yesod-dev's auto reload inside ghci
#!/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
#
@pcreux
pcreux / pipable.rb
Last active June 12, 2018 17:08
*nix has pipes, Elixir has pipes, Ruby deserves pipes.
# 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
#
@othiym23
othiym23 / npm-upgrade-bleeding.sh
Created September 20, 2014 19:36
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
@philm
philm / Dockerfile
Last active June 25, 2020 11:36
Docker setup for Ruby on Rails
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 - && \