Skip to content

Instantly share code, notes, and snippets.

View lukesmith's full-sized avatar

Luke Smith lukesmith

View GitHub Profile

@title[Introduction]

HTTP

A GitPitch Feature Tour

class ActiveDataTables
def initialize(query, params)
@query = query
@params = params
end
def execute
total = @query.count
filtered = total # don't currently support filtering records so this will be the same as the total

Keybase proof

I hereby claim:

  • I am lukesmith on github.
  • I am lukesmith (https://keybase.io/lukesmith) on keybase.
  • I have a public key ASA4tCvup3s-XdFKEfMHRoET8zac48KJWxFriGL3SZmh2Qo

To claim this, I am signing this object:

@lukesmith
lukesmith / gist:3920394
Created October 19, 2012 20:10
FM13 OSX Crash Details
Process: fm [78251]
Path: /Users/USER/Library/Application Support/Steam/*/fm.app/Contents/MacOS/fm
Identifier: com.sigames.eur.FootballManager2013
Version: 13 . 0 . 1 b 322309 (13 . 0 . 1 b 322309)
Code Type: X86 (Native)
Parent Process: launchd [388]
User ID: 501
Date/Time: 2012-10-19 21:00:57.787 +0100
OS Version: Mac OS X 10.8.2 (12C54)
@lukesmith
lukesmith / tester
Created February 17, 2012 17:34
url-tester
require 'csv'
require 'net/http'
require 'rainbow'
require 'uri'
csv = 'mycsv.csv'
@host_port = 'http://localhost:9292'
def make_request(url_path)
url = URI.parse(URI.escape(@host_port + url_path))
@lukesmith
lukesmith / gist:1511222
Created December 22, 2011 18:01
Why can't i do this?
class MyClass
@@defaults = {
:path => MyClass.default_path
}
def self.default_path
"something"
end
end
@lukesmith
lukesmith / AppConfig.Transformation.targets
Created June 17, 2011 11:24 — forked from jmangelo/AppConfig.Transformation.targets
VS 2010 RTM - MSBuild Project file for App.config XML transformations.
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- 20110617 : Luke Smith : Imports Microsoft.WebApplication.targets for SP1 support. Added exists condition for when the TransformedConfig doesn't exist -->
<!-- 20110224 : Ryan Milligan : Created OverrideAppConfigWithTargetPath target to fix ClickOnce deploy bug -->
<!-- 20100827 : João Angelo : Fixed bug when using Publish command within Visual Studio -->
<PropertyGroup>
<!-- Prevent circular dependency on Build target -->
<PipelineDependsOnBuild>false</PipelineDependsOnBuild>
<!-- Override project config file name (By default is set to Web.config) -->
<ProjectConfigFileName>App.config</ProjectConfigFileName>
@lukesmith
lukesmith / gist:1029107
Created June 16, 2011 12:06
OpenRasta exception stacktrace
[ArgumentNullException: Value cannot be null.
Parameter name: collection]
System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +12646187
OpenRasta.Pipeline.PipelineStage..ctor(IPipeline pipeline) +73
OpenRasta.Hosting.AspNet.OpenRastaModule.HandleHttpApplicationPostResolveRequestCacheEvent(Object sender, EventArgs e) +548
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +266
@lukesmith
lukesmith / common.target
Created May 19, 2011 13:26
common target file for sharing settings across projects
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(ToolsDir)' == ''">
<ToolsDir>$(SolutionDir)\Tools\</ToolsDir>
</PropertyGroup>
<PropertyGroup>
<StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings>
<StyleCopAnalysisTarget Condition=" '$(StyleCopAnalysisTarget)' == '' ">$(ToolsDir)StyleCop\Microsoft.SourceAnalysis.targets</StyleCopAnalysisTarget>
@lukesmith
lukesmith / update_point.rb
Created May 16, 2011 12:48
Ruby script to update a point dns record with the public ec2 instance ip address
require 'open-uri'
require 'point'
ip = open('http://169.254.169.254/latest/meta-data/public-ipv4').read
Point.username = "user@example.com"
Point.apitoken = "......"
zone = Point::Zone.find(<ZoneId>) # example.com
record = zone.record(<RecordId>) # teamcity.example.com