Test
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
<rule name="Rewrite subdomain" stopProcessing="false"> | |
<match url="(.*)" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="^(?!www)(\w+)\.domain\.net$" /> | |
</conditions> | |
<action type="Rewrite" url="{C:1}/{R:1}" /> | |
</rule> |
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
web = HtmlAgilityPack::HtmlWeb.new | |
doc = web.Load 'http://hk.news.yahoo.com/hongkong/index.html' | |
node = doc.DocumentNode.SelectSingleNode '/html/body/div/div[2]/div/div/div/div/div/div/div[2]' | |
node.ChildNodes.each do |n| | |
output.WriteLine n.InnerText | |
end | |
#output.WriteLine doc.DocumentNode.InnerHtml |
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
using System; | |
using System.IO; | |
using System.Reflection; | |
using IronRuby; | |
using Microsoft.Scripting.Hosting; | |
namespace IronRubyConsole | |
{ | |
class Program |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<configSections> | |
<section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting, Version=0.9.6.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" /> | |
</configSections> | |
<microsoft.scripting> | |
<languages> | |
<language names="IronRuby;Ruby;rb" extensions=".rb" displayName="IronRuby 0.9.3" | |
type="IronRuby.Runtime.RubyContext, IronRuby, Version=0.9.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> | |
</languages> |
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
<?php | |
if ($_GET['type'] == 'archive') | |
{ | |
try | |
{ | |
$db = new PDO("sqlite:talkonly.sqlite"); | |
$sql = "SELECT * FROM play_items ORDER BY list_id DESC, item_id ASC"; | |
$json_output = array(); |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Untitled Document</title> | |
<style type="text/css"> | |
<!-- | |
body { | |
background-color: #FCF8E0; | |
margin-left: 10px; |
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
NSString *url = @"http://brandontreb.com"; | |
NSString *apiEndpoint = [NSString stringWithFormat:@"http://api.tr.im/v1/trim_simple?url=%@",url]; | |
NSString *shortURL = [NSString stringWithContentsOfURL:[NSURL URLWithString:apiEndpoint] | |
encoding:NSASCIIStringEncoding | |
error:nil]; | |
NSLog(@"Long: %@ - Short: %@",url,shortURL); | |
// Outputs Long: http://brandontreb.com - Short: http://tr.im/MRDd |
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
using System; | |
using System.Linq; | |
using System.Net; | |
using System.Text.RegularExpressions; | |
using HtmlAgilityPack; | |
namespace EmbedHtml | |
{ | |
public class Embeder | |
{ |
- objc.io - A periodical about best practices and advanced techniques in Objective-C
- NSHipster - Interesting not-so-well-known bits about Objective-C and Cocoa
- iOS Unit Testing by Stuart Macgregor 13 Mar 2013
- Layer Trees vs. Flat Drawing – Graphics Performance Across iOS Device Generations by Florian Kugler 24 May 2013
- Overview of iOS Crash Reporting Tools by Cesare Rocchi 20 May 2013
OlderNewer