Skip to content

Instantly share code, notes, and snippets.

View kevinbluer's full-sized avatar
🚣

Kevin Bluer kevinbluer

🚣
View GitHub Profile
@IBAction func unwindFromView(segue: UIStoryboardSegue) {
// note that data can be passed with an unwind action
}
@kevinbluer
kevinbluer / gist:c1151dc76fb40050a10f
Created September 7, 2014 14:41
Styling a button
// some styling on the "sports" button
buttonSports.backgroundColor = UIColor(red: 0.5, green: 0.5, blue: 0.5, alpha: 0.5)
buttonSports.layer.cornerRadius = 10
buttonSports.layer.borderWidth = 2
buttonSports.layer.borderColor = UIColor( red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0 ).CGColor
function shuffleCards(cards){
var currentIndex = cards.length, temporaryValue, randomIndex;
// While there remain elements to shuffle...
while (0 !== currentIndex) {
// Pick a remaining element...
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
// And swap it with the current element.
{
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::bucket_name_here/*"
var alert = UIAlertController(title: "Hello", message: "World", preferredStyle: UIAlertControllerStyle.Alert)
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)
### Keybase proof
I hereby claim:
* I am kevinbluer on github.
* I am kevinbluer (https://keybase.io/kevinbluer) on keybase.
* I have a public key whose fingerprint is 038F F16B AC5B 175D 8666 58A9 75D0 AAA1 F65B 832C
To claim this, I am signing this object:
Router.route('/', function () {
this.render('MyTemplate');
});
@kevinbluer
kevinbluer / gist:4225506
Created December 6, 2012 15:48
Background position for the homework sprites
/* Home Button */
nav li.home {
width:115px;
height:60px;
}
nav li.home a{
background-position:-5px -5px;
}
nav li.home a:hover{
@kevinbluer
kevinbluer / gist:6631659
Created September 20, 2013 00:17
Hello...
...world!
@kevinbluer
kevinbluer / gist:7131090
Created October 24, 2013 03:55
Bluedot News Order Tweak
// from this...
$("#newsContainer").rss(
"https://news.google.com/news/feeds?q=%22horizon+media%22&safe=off&bav=on.2,or.r_cp.r_qf.&bvm=bv.50165853,d.dmg,pv.xjs.s.en_US.seW1cfrvSKg.O&biw=1440&bih=735&um=1&ie=UTF-8&output=rss", {
limit: 4,
entryTemplate: '<li onmouseover="hover(this)"><a href="{url}" target="_blank">{title}</a><br><span class="newsDate">{date}</span></li>'
});
});
// to this...