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
XmlDocument xDoc = null; | |
string xmlPath = "~/App_Data/SomeXml.xml"; | |
if (HttpContext.Current.Cache[xmlPath] == null) { | |
string cacheFilePath = HttpContext.Current.Server.MapPath(xmlPath); | |
xDoc = new XmlDocument(); | |
xDoc.Load(cacheFilePath); | |
HttpContext.Current.Cache.Insert(xmlPath, xDoc, new CacheDependency(cacheFilePath)); | |
} else { | |
xDoc = (XmlDocument)HttpContext.Current.Cache[xmlPath]; |
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
sub, sup { | |
/* Specified in % so that the sup/sup is the | |
right size relative to the surrounding text */ | |
font-size: 75%; | |
/* Zero out the line-height so that it doesn't | |
interfere with the positioning that follows */ | |
line-height: 0; | |
/* Where the magic happens: makes all browsers position |
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
jQuery.checkVersion = function( min, max ) { | |
var current = jQuery.fn.jquery + 'zz'; | |
max = ( max || min ) + 'zz'; | |
min += '0.0.0zz'.substr( min.length ); | |
return min <= current && current <= max; | |
}; | |
// This one will also handle 'pre' suffix as minor of 'alpha' and 'beta'. | |
jQuery.checkVersion = (function(){ |
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
/*! | |
* jQuery isVersion - v0.1 - 07/02/2010 | |
* http://benalman.com/ | |
* | |
* Copyright (c) 2010 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
*/ | |
(function($){ |
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.Linq; | |
using Newtonsoft.Json.Linq; | |
namespace FacebookChallenge | |
{ | |
class Program | |
{ | |
static readonly string accessToken = "GET YOUR OWN FOO"; | |
static readonly string baseUrl = "https://graph.facebook.com/{0}/{1}?access_token={2}"; |
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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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
#!/usr/bin/env ruby | |
require 'ftools' | |
require 'fileutils' | |
require 'rubygems' | |
require 'RMagick' | |
include Magick | |
require 'open3' | |
def merge( files = [] ) |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
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
//dynamically generated by ASP.NET for the language passed in. | |
var labels = { | |
language: 'English', | |
objectOverlay: { | |
closeX: 'Close X', | |
fallback: 'Video for {vid}' | |
}, | |
global: { | |
label1: 'label1', | |
label2: 'label2' |
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
.journal-comment-area-wrapper .comment .signature:before { | |
font-size: 10px; | |
content: ''; | |
display: block; | |
height: 0; | |
width: 0; | |
border-right: 2em solid #666; | |
border-bottom: 2em solid #000; | |
border-bottom: 2em solid transparent; | |
position: absolute; |
OlderNewer