This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name www.$<domain>.$<tld>; | |
return 301 $scheme://$domain.$tld$request_uri; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(window.scrollMaxY === null) { | |
Object.defineProperty(window, 'scrollMaxY', { | |
get: function() { return document.documentElement.scrollHeight - document.documentElement.clientHeight; } | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace FizzBuzz | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
string s; | |
for(int i = 1; i <= 100; i++) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ConsoleApplication | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var chicken = new Animal<Egg>(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 */; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
isbn, | |
title, | |
price, | |
imageFilename, | |
compositeName | |
FROM tblbooks books | |
JOIN tblauthors authors | |
ON tblbooksauthorsxref.isbn = books.isbn AND | |
tblbooksauthorsxref.authorId = authors.authorId |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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]; | |