This file contains 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
# Extract metadata (like Logical name, file paths, etc.) from a SQL Server backup file into an Array of Hashes. | |
# This assumes you're running on Windows and have SQL Server installed locally. | |
# example usage: | |
# | |
# require 'sqlserver_backup_info' | |
# | |
# bak = File.expand_path('../MyBackup.bak', __FILE__) | |
# info = extract_info bak | |
# info.each { |meta| puts meta[:logical_name] } | |
# |
This file contains 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.Globalization; | |
using System.Web.Mvc; | |
namespace Zomg.Web.ModelBinders | |
{ | |
public class Iso8601DateTimeBinder : DefaultModelBinder | |
{ | |
public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) | |
{ |
This file contains 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
REGEDIT4 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00 |
This file contains 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
#forms { | |
@input: #454545; | |
@input_border: #CCCCCC; | |
} | |
/* then, somewhere later try to use that */ | |
fieldset { | |
input { | |
color: #forms > @input; /* maybe #forms[@input] is a better syntax? |
This file contains 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
say -v Fred "Fitter, happier, more productive, | |
comfortable, | |
not drinking too much, | |
regular exercise at the gym | |
(3 days a week), | |
getting on better with your associate employee contemporaries, | |
at ease, | |
eating well | |
(no more microwave dinners and saturated fats), | |
a patient better driver, |
This file contains 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
.gradient(@from:#fff, @to:#fff, @fallback:@from) { | |
/* https://github.com/jamesfoster/dotless/commit/4004eff3cab321e31f43d052e35b5538f19443f7 */ | |
@ffgradient: "-moz-linear-gradient(top, {0}, {1}) no-repeat scroll 0 0 transparent"; | |
@wkgradient: "-webkit-gradient(linear,left top,left bottom,color-stop(0, {0}),color-stop(1, {1})) no-repeat scroll 0 0 transparent"; | |
@iegradient: "progid:DXImageTransform.Microsoft.gradient(startColorstr='{0}', endColorstr='{1}')"; | |
@ie8gradient: "\"progid:DXImageTransform.Microsoft.gradient(startColorstr='{0}', endColorstr='{1}')\""; | |
background: @fallback; /* for non-css3 browsers */ | |
background: formatstring(@ffgradient, @from, @to); /* FF3.6+ */ |
This file contains 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
brew install git |
This file contains 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
class ApplicationController < (defined?(Rails) && ActionController::Base || Object) | |
end |
This file contains 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
class Account < ActiveRecord::Base | |
def invalidate! | |
update_attributes(:enabled => false) | |
end | |
end |
This file contains 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
<!-- the original SPARK template --> | |
<!-- notice the SINGLE QUOTES on the data-form attribute --> | |
<div data-form='{"method":"get", "action":"search"}'> | |
<input type="search" name="q" placeholder="search..." /> | |
<input type="submit" value="go!" /> | |
</div> | |