I hereby claim:
- I am richrad on github.
- I am richrad (https://keybase.io/richrad) on keybase.
- I have a public key whose fingerprint is 7DF3 B0D0 01AC 1591 0652 5D60 B005 35A8 5C06 FA2C
To claim this, I am signing this object:
extension UIColor { | |
// get a complementary color to this color | |
// https://gist.github.com/klein-artur/025a0fa4f167a648d9ea | |
var complementary: UIColor { | |
let ciColor = CIColor(color: self) | |
// get the current values and make the difference from white: | |
let compRed: CGFloat = 1.0 - ciColor.red |
override func viewWillDisappear(animated: Bool) { | |
defer { | |
super.viewDidDisappear(animated) | |
} | |
guard let _ = self.navigationController?.viewControllers.indexOf(self) else { | |
print("going back") | |
return | |
} | |
} |
# Builds a Libjpeg framework for the iPhone and the iPhone Simulator. | |
# Creates a set of universal libraries that can be used on an iPhone and in the | |
# iPhone simulator. Then creates a pseudo-framework to make using libjpeg in Xcode | |
# less painful. | |
# | |
# To configure the script, define: | |
# IPHONE_SDKVERSION: iPhone SDK version (e.g. 8.1) | |
# | |
# Then go get the source tar.bz of the libjpeg you want to build, shove it in the | |
# same directory as this script, and run "./libjpeg.sh". Grab a cuppa. And voila. |
import UIKit | |
extension CGSize { | |
init(width: Float, height: Float) { | |
self.width = CGFloat(width) | |
self.height = CGFloat(height) | |
} | |
} |
import sys | |
from bs4 import BeautifulSoup | |
from urllib.request import urlopen | |
url = sys.argv[1] | |
page = urlopen(url) | |
soup = BeautifulSoup(page) | |
for a in soup.find_all('a'): | |
print(a.get('href')) |
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
import re | |
import string | |
from collections import OrderedDict, Counter | |
def clean_input(input): | |
input = re.sub('\n+', ' ', input) | |
input = re.sub('\[[0-9]*\]', '', input) | |
input = re.sub(' +', ' ', input) |
board=micro | |
browser.linux=mozilla | |
build.verbose=false | |
console=true | |
console.auto_clear=true | |
console.error.file=stderr.txt | |
console.length=500 | |
console.lines=4 | |
console.output.file=stdout.txt | |
editor.antialias=false |
I hereby claim:
To claim this, I am signing this object:
#floating_header { | |
background-clip: border-box; | |
background-origin: padding-box; | |
background-color: #FFFFFF; | |
display: block; | |
height: auto; | |
position: fixed; | |
top: 0px; | |
width: 100%; | |
box-shadow: 0 3px 2px -2px #878787; |