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
| <?php | |
| /* | |
| OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
| Author: _ck_ (with contributions by GK, stasilok) | |
| Version: 0.1.7 | |
| Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
| * revision history | |
| 0.1.7 2015-09-01 regex fix for PHP7 phpinfo | |
| 0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
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
| // Sonic Screw Driver | |
| // CONSTANTS AND VARIABLES | |
| const int button2 = 2; | |
| const int button3 = 3; | |
| const int speaker = 4; | |
| const int inputVoltagePin = 6; | |
| const int IREMITTER = 7; | |
| const int IRRECEIVER = 8; | |
| const int LED = 9; |
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+ |
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
| 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
| #!/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
| // ==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
| /* | |
| * 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
| 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
| #!/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 |