Skip to content

Instantly share code, notes, and snippets.

@brunokoga
brunokoga / CTExposureDetectionSession+Extensions.swift
Created April 14, 2020 07:51 — forked from mattt/CTExposureDetectionSession+Extensions.swift
Theoretical convenience API for working with Apple's ContactTracing framework
import ContactTracing
extension CTExposureDetectionSession {
func addPositiveDiagnosisKeys(batching keys: [CTDailyTracingKey], completion: CTErrorHandler) {
if keys.isEmpty {
completion(nil)
} else {
let cursor = keys.index(keys.startIndex, offsetBy: maxKeyCount, limitedBy: keys.endIndex) ?? keys.endIndex
let batch = Array(keys.prefix(upTo: cursor))
let remaining = Array(keys.suffix(from: cursor))
@brunokoga
brunokoga / 0_reuse_code.js
Created September 1, 2014 16:55
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@brunokoga
brunokoga / d&d-preface.md
Created September 1, 2014 16:52
D&D Preface

#Preface Once upon a time, long, long ago, in a real called the Midwestern United States -- specially the states of Minnesota and Wisconsin, -- a group of friends gathered together to forever alter the history of gaming.

It wasn't their intent to do so. They were tired of merely reading tales about wolds of magic, monsters and adventure. They wanted to play in those worlds, rather than observe them.That they went on to invent Dungeons & Dragons, and thereby ignite a revolution in gaming that continues to this day, speaks to two things.

First, it speaks to their ingenuity and genius in figuring out that games were the perfect way to explore worlds that could not otherwise exist. Almost every modern game, whether played on a digital device or a tabletop, owes some debt to D&D.

Second, it is a testament to the inherent appeal of the game they created. Dungeons & Dragons sparked a thriving global phenomenon. It is the first roleplaying game, and it remains one of the best of its breed.

To play D&D, and to pla

//RECEBO:
{
exception = {
class = RecordNotFound;
message = "Couldn't find GsfsRetail::Organization without an ID";
};
}
//ENVIO:
@brunokoga
brunokoga / gist:5d82a47304dcd04b6cf5
Last active August 29, 2015 14:02
Desprendimento

Quando voltei da minha segunda viagem ao Japão, em março de 2008, uma inusitada surpresa esperava por mim na república¹ em que eu morava em São Carlos: todas as minhas roupas haviam sumido! Todas.

Antes de ir passar 3 meses em Toyota, em dezembro de 2007, deixei todas os meus pertences (roupas, na grande maioria) guardadas em um só lugar, pois nós, da república, estávamos de mudança para uma casa maior e as pessoas que moravam comigo iam levar minhas coisas para a casa nova. Quando voltei, ninguém sabia onde estavam as minhas roupas!

Nessa época, eu morava em uma casa de três quartos com mais sete pessoas. Até hoje ninguém conseguiu me explicar direito o que aconteceu, mas a verdade é que eu estava ali, com apenas algumas peças de roupa e nenhuma vontade (nem dinheiro) para comprar mais. Então, a partir desse dia todos os meus pertences passaram a ser apenas o conteúdo de duas pequenas malas e uma mochila, que eram tudo que eu tinha trazido de volta do Japão.

Depois de passado o estresse inicial (que não

---
layout: nil
---
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>

###Mulata #####XXX Elemental Warrior (mul), lvl 4, XP 6400 #####Medium humanoid

Init +1; Senses darkvision 30ft; Perception +0

####Defense

  • AC 20, touch 12, flat-flooted 18
  • HP 46 (4d10+20)
  • Fort +4, Ref +3, Will +4
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Usage: provide a title argument."
exit -1
else
title="$@"
fi
d=$(date +"%Y-%m-%d")
#!/bin/sh
#
# update_storyboard_strings.sh - automatically extract translatable strings from storyboards and update strings files
# Based on http://forums.macrumors.com/showpost.php?p=16060008&postcount=4 by mikezang
storyboardExt=".storyboard"
stringsExt=".strings"
newStringsExt=".strings.new"
oldStringsExt=".strings.old"
localeDirExt=".lproj"
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
af Afrikaans
af_NA Afrikaans (Namibia)
af_ZA Afrikaans (South Africa)
agq Aghem
agq_CM Aghem (Cameroon)
ak Akan
ak_GH Akan (Ghana)
am Amharic
am_ET Amharic (Ethiopia)
ar Arabic