Skip to content

Instantly share code, notes, and snippets.

@steevp
steevp / siralim_breeding.py
Last active September 6, 2016 14:49
Scrapes breeding combinations from Siralim Wiki and writes them to a csv file
#!/usr/bin/env python3
# Scrapes breeding combinations from Siralim Wiki and writes them to a csv file
import csv
import requests
import re
from bs4 import BeautifulSoup
with open('Breeding Combinations.csv', 'w', newline='') as csvfile:
writer = csv.writer(csvfile, quoting=csv.QUOTE_MINIMAL)
html = requests.get('http://siralim.gamewiki.tips/doku.php?id=breeding').text
@danivovich
danivovich / ladders.go
Created September 10, 2013 20:43
Chutes and Ladders in Go
package main
import (
"fmt"
"math/rand"
"os"
"text/tabwriter"
"time"
)
source ~/.bash_profile
cd ${SRCROOT}
/path/to/xctool.sh -reporter json-compilation-database:compile_commands.json clean
/path/to/xctool.sh -reporter json-compilation-database:compile_commands.json build
oclint-json-compilation-database | sed 's/\(.*\.\m\{1,2\}:[0-9]*:[0-9]*:\)/\1 warning:/'
@tomohisa
tomohisa / gist:2897676
Created June 8, 2012 19:20
Add and Remove ChildViewController
// add child view
UIViewController* controller = [self.storyboard instantiateViewControllerWithIdentifier:@"test"];
[self addChildViewController:controller];
controller.view.frame = CGRectMake(0, 44, 320, 320);
[self.view addSubview:controller.view];
[controller didMoveToParentViewController:self];
// remove child view
UIViewController *vc = [self.childViewControllers lastObject];
[vc.view removeFromSuperview];