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
// ~ JavaScript Kung-FU, with an excess chunky bacon dose! ~ | |
// This plugin allows seamless ajax file uploads without having | |
// a fixed file input button. It achieves this by installing an | |
// OnMouseMove handler over the interested elements, and moving | |
// the input button under the cursor. <<If Muhammad won't go to | |
// the the mountain, the mountain will come to Muhammad.>> :-). | |
// | |
// This approach is needed on the majority of browser, except | |
// Safari, on which the coder is allowed to trigger a "click" | |
// event onto an input type=file element. On other browsers, |
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
<html> | |
<head> | |
<title>The mirror is currently updating. Please wait.</title> | |
</head> | |
<body> | |
<h2>The mirror is currently resyncing to the master site.</h2> | |
<h3>The process will be completed in a matter of minutes.</h3> | |
<p>In the meantime, try to visit the <a href="http://opensource.org">original site</a> or, if it's unreachable, try one of the following mirrors:</p> | |
<p><a href="http://opensource.gds.tuwien.ac.at/">Austria</a> | <a href="http://os.fsfmirror.com/">Belgium</a> | <a href="http://opensource.usrbinruby.net/">Canada</a> (<a href="http://open2.mirrors-r-us.net/">2</a>) | <a href="http://opensource.mirrors.typhon.net/">France</a> (<a href="http://os3.fsfmirror.com/">2</a>) | <a href="http://opensource.mirroring.de/">Germany</a> (<a href="http://opensource.linux-mirror.org/">2</a>,<a href="http://os2.fsfmirror.com/">3</a>,<a href="http://opensource.erde3.net/">4</a>) | <a href="http://open3.mirrors-r-us.net">Japan</a> | (<a href="http://open1.mirrors-r-us.net/">2</a>) | <a href |
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
77 <script type="text/javascript">// <![CDATA[ | |
78 var theLoadSequenceToRunAfterTheDocumentHasBeenLoaded = function() { | |
79 | |
80 // The blinking border | |
81 // | |
82 (function(t){// (C) 2009 vjt <segmentation-fault@core-dumped.info> | |
83 var $=function(_){return(document.getElementById(_));};var ee =[ | |
84 $('n'),$('s'),$('w'),$('e')],e,_=true;setInterval(function(){for | |
85 (var i=ee.length;i&&(e=ee[--i]) ;_) {e.className=e.className?'': | |
86 'b';}},t*08); /* .oOo.oOo.oOo. ^^^ -*** * *** *** *******- */ |
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 | |
# SRT Subtitle fixer v0.5 | |
# Applies a time or id shift to an SRT subtitle file. | |
# | |
# (C) 2008 vjt@openssl.it | |
# | |
# Usage: ./fixsrt file.srt <timeshift> [idshift] | |
# - timeshift: time shift in floating point (seconds) | |
# - idshift: subtitle id shift, integer, useful |
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
<?php | |
/* Instructions: Upload to your wp-admin directory after installing WordPress and run. | |
* | |
* NOTE: You MUST install wordpress and b2evo in the same database BEFORE running the script! | |
* | |
* Original script by Fahim Farook, modified by David Appleyard and: | |
* | |
* Tom Everett - March 3, 2005 | |
* 1. WP "post_date" is now populated from B2 "post_issue_date" | |
* 2. Post statuses are now migrated across |
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
// ==UserScript== | |
// @name Twitter Search Results on Google | |
// @namespace markcarey | |
// @description Shows results from Twitter on Google search pages | |
// @include http://www.google.*/search?*q=* | |
// @include http://www.google.*/* | |
// @date 2009-05-13 | |
// @version 1.1 | |
// @GM_version 0.8.20080609.0 | |
// ==/UserScript== |
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
// Simple tabs implementation that requires the same markup as jQuery UI Tabs, but doesn't modify your | |
// markup or impose an horizontal layout of tabs. You're on your own setting up CSS, of course. Sample | |
// markup: | |
// | |
// <div id="tabs"> | |
// <ul> | |
// <li><a href="#group-1">group 1</a></li> | |
// <li><a href="#group-2">group 2</a></li> | |
// </ul> | |
// <div id="group-1"></div> |
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
// Just what the name says: hide the default value of a text input onFocus, and restores it if empty onBlur. | |
// Simple and effective, jQuery is awesome! Sample markup: | |
// | |
// <input id="search" type="text" value="Search" /> | |
// <script type="text/javascript">$('#search').toggleDefaultValue()</script> | |
// | |
// - vjt@openssl.it | |
// | |
$.fn.toggleDefaultValue = function() { | |
return this.each(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
#!/bin/bash | |
# Database Dump utility for MySQL. Put in cron like this: | |
# | |
# DUMPDIR='/home/example/DatabaseDumps' USER='dbuser' PASS='dbpass' DB='dbname' /path/to/dumpdb.sh | |
# | |
# (C) 2009 vjt@openssl.it | |
# | |
[ -z "$MAXAGE" ] && MAXAGE=744 |
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
# ActiveRecord helper to manage an integer `status` column using Ruby :symbols. | |
# (C) 2009 Marcello Barnaba <vjt@openssl.it> - Released under the terms of the MIT License | |
# http://sindro.me/ | |
# | |
# == Usage == | |
# | |
# [REQUIRED] Put this file in lib/ | |
# [OPTIONAL] Fork this gist | |
# [OPTIONAL] Pluginize it | |
# [OPTIONAL] Write some tests |