Skip to content

Instantly share code, notes, and snippets.

View RyanBreaker's full-sized avatar

Ryan Breaker RyanBreaker

View GitHub Profile
server {
server_name www.$<domain>.$<tld>;
return 301 $scheme://$domain.$tld$request_uri;
}
<!--Some men just want to watch the world burn.-->
<style>
.red-button {
background-color: blue;
}
</style>
<button id="button" class="pulsate red-button">Click me!</button>
<script>
$("button#button").css("background-color", "red");
</script>
if(window.scrollMaxY === null) {
Object.defineProperty(window, 'scrollMaxY', {
get: function() { return document.documentElement.scrollHeight - document.documentElement.clientHeight; }
});
}
namespace FizzBuzz
{
public class Program
{
public static void Main(string[] args)
{
string s;
for(int i = 1; i <= 100; i++)
{
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var chicken = new Animal<Egg>();
}
}
var koa = require('koa');
var app = koa();
// x-response-time
app.use(function *(next){
var start = new Date;
yield next;
var ms = new Date - start;
this.set('X-Response-Time', ms + 'ms');
-- MySQL dump 10.13 Distrib 5.5.42, for osx10.6 (i386)
--
-- Host: localhost Database: volga
-- ------------------------------------------------------
-- Server version 5.5.42
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
SELECT
isbn,
title,
price,
imageFilename,
compositeName
FROM tblbooks books
JOIN tblauthors authors
ON tblbooksauthorsxref.isbn = books.isbn AND
tblbooksauthorsxref.authorId = authors.authorId
@IBOutlet weak var datePicker: UIDatePicker!
@IBAction func displayDay(sender: AnyObject) {
let formatter = NSDateFormatter()
formatter.dateFormat = "EEEE"
let day = formatter.stringFromDate(datePicker.date)
let msg = "Thats a \(day)."
let alert = UIAlertView(title: "What day is that?", message: msg, delegate: nil, cancelButtonTitle: "Okay")
- (IBAction)displayDay:(id)sender {
NSDate *chosen = [self.datePicker date];
NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
[formatter setDateFormat:@"EEEE"];
NSString *day = [formatter stringFromDate:chosen];
NSString *msg = [[NSString alloc] initWithFormat:@"That's a %@.", day];