This is a summary of an original prose piece
Author
- Patches to be kept as small as practicable
- Patches to be explained clearly
Reviewer
- What is the intent of the patch?
# Compute odds of occurrence of N symbol Y in M dice | |
# | |
symbols = ARGV[0].split(",") # ["s", "ss", "sss", "h", "b", "f"] | |
m = ARGV[1].to_i | |
n = ARGV[2].to_i | |
y = ARGV[3] | |
def to_radix(int, radix) |
Simple server which just formats and prints JSON requests. |
FROM ubuntu:14.04 | |
MAINTAINER Oisin Hurley <oisin@nis.io> | |
RUN apt-get update && apt-get install -y curl wget git | |
RUN adduser --home /home/api_server --disabled-password --gecos '' api_server | |
RUN adduser api_server sudo | |
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | |
USER api_server | |
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 | |
RUN curl -sSL https://get.rvm.io | bash -s stable | |
RUN /bin/bash -l -c "source /home/api_server/.rvm/scripts/rvm" |
require 'thread' | |
module Alert | |
def self.yikes(msg) | |
# Use this to log/trigger monitor | |
puts msg | |
end | |
end | |
# See http://burgestrand.se/code/ruby-thread-pool/ |
This is a summary of an original prose piece
Author
Reviewer
# Crush all the Pings! | |
for i in *.png | |
pngcrush "$i" `basename -s .png "$i"`-crushed.png |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
# This initializer adds a method, show_mongo, when running a rails console. When active, all | |
# moped commands (moped is mongoid's mongodb driver) will be logged inline in the console output. | |
# If called again, logging will be restored to normal (written to log files, not shown inline). | |
# Usage: | |
# > show_mongo | |
if defined?(Rails::Console) | |
def show_mongo | |
if Moped.logger == Rails.logger | |
Moped.logger = Logger.new($stdout) |
I hereby claim:
To claim this, I am signing this object:
# Simple tester for Converser SDK feedback form manipulation. No network connections | |
# made. | |
#import "CIOSecondViewController.h" | |
@interface CIOSecondViewController () | |
@property (strong,nonatomic) VGConversationEngine *converser; | |
@end | |
@implementation CIOSecondViewController |