Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
[user] | |
name = Pavan Kumar Sunkara | |
email = pavan.sss1991@gmail.com | |
[core] | |
editor = vim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
[sendemail] | |
smtpencryption = tls | |
smtpserver = smtp.gmail.com | |
smtpuser = pavan.sss1991@gmail.com |
/* | |
* | |
* First, set up a backend to answer the request if there's not a cache hit. | |
* | |
*/ | |
backend default { | |
# Set a host. | |
.host = "192.168.1.100"; |
- (UIViewController *)topViewController{ | |
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; | |
} | |
- (UIViewController *)topViewController:(UIViewController *)rootViewController | |
{ | |
if (rootViewController.presentedViewController == nil) { | |
return rootViewController; | |
} | |
function Event(name){ | |
this.name = name; | |
this.callbacks = []; | |
} | |
Event.prototype.registerCallback = function(callback){ | |
this.callbacks.push(callback); | |
} | |
function Reactor(){ | |
this.events = {}; |
// -*- compile-command: "clang++ -ggdb -o random_selection -std=c++0x -stdlib=libc++ random_selection.cpp" -*- | |
//Reference implementation for doing random number selection from a container. | |
//Kept for posterity and because I made a surprising number of subtle mistakes on my first attempt. | |
#include <random> | |
#include <iterator> | |
template <typename RandomGenerator = std::default_random_engine> | |
struct random_selector | |
{ | |
//On most platforms, you probably want to use std::random_device("/dev/urandom")() |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
// | |
// GameCenterInteractor.swift | |
// GameKitInteraction | |
// | |
// Created by Stuart Breckenridge on 19/11/14. | |
// Copyright (c) 2014 Stuart Breckenridge. All rights reserved. | |
// | |
import UIKit | |
import GameCenter |
# Based on http://www.jonathanleighton.com/articles/2011/awesome-active-record-bug-reports/ | |
# Run this script with `$ ruby my_script.rb` | |
require 'sqlite3' | |
require 'active_record' | |
# Use `binding.pry` anywhere in this script for easy debugging | |
require 'pry' | |
# Connect to an in-memory sqlite3 database |
This guide assumes that you recently run brew upgrade postgresql
and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.
First let's check something.
brew info postgresql
The top of what gets printed as a result is the most important: