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
| /** | |
| * Based off of the Lucene prolog parser in the wordnet contrib package within the | |
| * main Lucene project. It has been modified to remove the Lucene bits and generate | |
| * a synonyms.txt file suitable for consumption by Solr. The idea was mentioned in | |
| * a sidebar of the book Solr 1.4 Enterprise Search Server by Eric Pugh. | |
| * | |
| * @see <a href="http://lucene.apache.org/java/2_3_2/lucene-sandbox/index.html#WordNet/Synonyms">Lucene Sandbox WordNet page</a> | |
| * @see <a href="http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/contrib/wordnet/">SVN Repository of the WordNet contrib</a> | |
| * @see <a href="https://www.packtpub.com/solr-1-4-enterprise-search-server/book">Solr 1.4 Enterprise Search Server Book</a> | |
| */ |
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
| module Jekyll | |
| class LessCssFile < StaticFile | |
| def write(dest) | |
| # do nothing | |
| end | |
| end | |
| # Expects a lessc: key in your _config.yml file with the path to a local less.js/bin/lessc | |
| # Less.js will require node.js to be installed |
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
| #!/bin/sh | |
| # purge-cache: Script to purge varnish cache. Defaults are defined in | |
| # /etc/default/varnish. | |
| # | |
| # Cosimo <[email protected]> | |
| # Based on reload-vcl, by Stig Sandbeck Mathisen <ssm at debian dot org> | |
| # Settings | |
| defaults=/etc/default/varnish |
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
| require 'rubygems' | |
| require 'sequel' | |
| database = Sequel.connect('sqlite://sickbeard.db') | |
| database[:tv_episodes].select(:location, :episode_id).exclude(:location => "").each do |show| | |
| if !File.file?(show[:location]) | |
| database[:tv_episodes].filter(:episode_id => show[:episode_id]).delete | |
| end | |
| end |
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
| /* | |
| * anchor-include pattern for already-functional links that work as a client-side include | |
| * Copyright 2011, Scott Jehl, scottjehl.com | |
| * Dual licensed under the MIT | |
| * Idea from Scott Gonzalez | |
| * to use, place attributes on an already-functional anchor pointing to content | |
| * that should either replace, or insert before or after that anchor | |
| * after the page has loaded | |
| * Replace: <a href="..." data-replace="articles/latest/fragment">Latest Articles</a> | |
| * Before: <a href="..." data-before="articles/latest/fragment">Latest Articles</a> |
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
| // ==UserScript== | |
| // @name Use Markdown, sometimes, in your HTML. | |
| // @author Paul Irish <http://paulirish.com/> | |
| // @link http://git.io/data-markdown | |
| // @match * | |
| // ==/UserScript== | |
| // If you're not using this as a userscript just delete from this line up. It's cool, homey. |
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
| #!/bin/bash | |
| # | |
| ######################################################################### | |
| #This software code is made available "AS IS" without warranties of any # | |
| #kind. You may copy, display, modify and redistribute the software # | |
| #code either by itself or as incorporated into your code; provided that # | |
| #you do not remove any proprietary notices. Your use of this software # | |
| #code is at your own risk and you waive any claim against Amazon # | |
| #Digital Services, Inc. or its affiliates with respect to your use of # | |
| #this software code. (c) 2006-2007 Amazon Digital Services, Inc. or its # |
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
| server 'staging.domain.tld', :app, :web, :db, :primary => true | |
| set :branch do | |
| default_tag = "master" | |
| tag = Capistrano::CLI.ui.ask "What tag/branch do you want to deploy? [#{default_tag}] " | |
| tag = default_tag if tag.empty? | |
| tag | |
| end | |
| set :rails_env, 'staging' |
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
| Silverpop uses xml rulesets to display dynamic content in emails. When you have the content already created elsewhere, it can be a pain to create rulesets with more than one rule. This script goes out of its way to remove you from having to touch xml, instead opting for building the ruleset based on parameters in objects. | |
| Mainly gisting this for retrieval later on by myself, however, if you want help using it contact me. |
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
| // Drop shadow using SVG/CSS filters were possible | |
| // Requires Modernizr and the css-filters and svg-filters community add-ons | |
| .filter-shadow(@x, @y, @size, @color) { | |
| // Firefox 10+ | |
| .svgfilters & { | |
| @svgSize: @size/2; // the SVG blur is a little larger than the CSS equivalent | |
| filter: url('data:image/svg+xml;utf8,<svg%20height="100"%20xmlns="http://www.w3.org/2000/svg"><filter%20id="drop-shadow"><feGaussianBlur%20in="SourceAlpha"%20stdDeviation="@{svgSize}"/><feOffset%20dx="@{x}"%20dy="@{y}"%20result="offsetblur"/><feFlood%20flood-color="@{color}"/><feComposite%20in2="offsetblur"%20operator="in"/><feMerge><feMergeNode/><feMergeNode%20in="SourceGraphic"/></feMerge></filter></svg>#drop-shadow'); | |
| } | |
| // Chrome 19+, Safari 6+ |
OlderNewer