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
# coding: utf-8 | |
#1) Synchronize your blog comments with IntenseDebate | |
#2) Export an XML file from your existing blog. Leave it running, so that attachments can be downloaded. | |
#3) Rename the .xml file to 'wordpress.xml' and place in root of the new nesta website. | |
#4) Run the import | |
# This does a fast 'offline import'. Use this first to verify there are no errors | |
# ruby -r './import.rb' -e 'Nesta::WordpressImport.process(true)' |
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
module Nesta | |
module Formats | |
@preferred_mappings = Hash.new | |
@template_mappings = Hash.new { |h, k| h[k] = [] } | |
def self.extensions | |
@template_mappings.keys | |
end | |
def self.normalize(ext) |
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
protected virtual bool BuildUnmanaged(object source, object dest, ResizeSettings settings) { | |
if (!FreeImageAPI.FreeImage.IsAvailable()) return false; | |
if (!"true".Equals(settings["freeimage"])) return false; | |
// Load the example bitmap. | |
FIBITMAP original = FIBITMAP.Zero; | |
FIBITMAP final = FIBITMAP.Zero; | |
if (source is String) |
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 tiny jQuery plugin to provide live previews for Jcrop | |
Init by calling on an empty div which you'd like to contain the preview. | |
You can specify a width and height using the defaultWidth and defaultHeight settings, although CSS width/height specified on the div take precedence. | |
Ex: | |
$("div.preview").JcropPreview({ jcropImg: $("img.primaryImage") }); | |
After initializing the preview, then you can start up Jcrop. If you don't have any special onSelect event handling to do, call $("div.preview").JcropPreviewUpdateFn() to create a handler for the event: | |
Ex. |
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
public string FaceCascade = @"haarcascade_frontalface_default.xml"; | |
public string LeftEyeCascade = @"haarcascade_lefteye_2splits.xml"; | |
public string RightEyeCascade = @"haarcascade_righteye_2splits.xml"; | |
public string EyePair45 = @"hhaarcascade_mcs_eyepair_big.xml"; |
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
#!/bin/sh | |
sudo yum update -y | |
cd /var/www/html/ | |
#Update git repo and checkout the appropriate branch | |
if [ -r /var/www/html/.git/HEAD ]; then | |
su -s /bin/sh apache -c "git remote rm origin" | |
su -s /bin/sh apache -c "git remote add origin git@github.com:lensnetllc/direct-lens.git" | |
su -s /bin/sh apache -c "git pull origin master" | |
su -s /bin/sh apache -c "git checkout master" |
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
15" MacBookPro with Retina Display | |
2.6GHz Quad-core Intel Core i7, Turbo Boost up to 3.6GHz | |
16GB 1600MHz DDR3L SDRAM | |
768GB Flash Storage | |
Apple USB SuperDrive | |
Backlit Keyboard (English) & User's Guide | |
AppleCare Protection Plan for 15" and 17" MacBook Pro and 15" MacBook Pro with Retina display - Auto-enroll | |
Apple Thunderbolt to Gigabit Ethernet Adapter | |
MagSafe to MagSafe 2 Converter |
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
public void SetLastModified(DateTime date) | |
{ | |
DateTime utcDate = DateTimeUtil.ConvertToUniversalTime(date); | |
this.UtcSetLastModified(utcDate); | |
} | |
private void UtcSetLastModified(DateTime utcDate) | |
{ | |
utcDate = new DateTime(utcDate.Ticks - utcDate.Ticks % 10000000L); | |
if (utcDate > DateTime.UtcNow) | |
{ |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using ImageResizer.Resizing; | |
using System.Drawing; | |
using ImageResizer.ExtensionMethods; | |
using ImageResizer.Util; | |
namespace ImageResizer.Plugins.CropAround { |
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.Collections.Generic; | |
using System.Text; | |
using ImageResizer.Configuration; | |
using System.Web.Hosting; | |
using System.Collections.Specialized; | |
namespace ImageResizer.Plugins.Basic { | |
/// <summary> | |
/// Adds URL syntax support for legacy projects: |
OlderNewer