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 | |
mb_internal_encoding("UTF-8"); | |
$desc = <<<TEXT | |
<p>Lines of text SHOULD NOT be longer than 75 octets, (och hör på den) excluding the line break. Long content lines SHOULD be split into a multiple line representations using a line "folding" technique.</p> | |
That is, a long line can be split between any two characters by inserting a CRLF | |
immediately followed by a single linear white space character (i.e., | |
SPACE, <b>US-ASCII</b> decimal 32 or HTAB, US-ASCII decimal 9). Any sequence | |
of CRLF followed immediately by a single linear white space character | |
is ignored (i.e., removed) when processing the content type. |
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
// | |
// this is about parsing-performance of xml/html-parsers | |
// to be more precisely, i just want to look for specific nodes/attributes | |
// | |
// i am testing | |
// | |
// * (htmlparser)[https://github.com/tautologistics/node-htmlparser] | |
// * (html5)[https://github.com/aredridel/html5] | |
// * (sax)[https://github.com/isaacs/sax-js] | |
// * (jsdom)[https://github.com/tmpvar/jsdom] + sizzle/jquery |
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 | |
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'` | |
for JAIL in $JAILS | |
do | |
fail2ban-client status $JAIL | |
done |
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
// -------------------------------------------------------- | |
// arrows | |
// -------------------------------------------------------- | |
// $direction: top, left, right, bottom, top-left, top-right, bottom-left, bottom-right | |
// $color: hex, rgb or rbga | |
// $size: px or em | |
// @example | |
// .element{ | |
// @include arrow(top, #000, 50px); | |
// } |
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
# Please refer to http://ctoinsights.wordpress.com/2011/10/17/running-distributed-cron-jobs-in-the-cloud/ | |
class DatabaseSemaphore < ActiveRecord::Base | |
validates_presence_of :name, :message => "can't be blank" | |
def self.open?(name, lock_duration = 600) | |
# only one requestor can get open semaphore at a time | |
# sempahore can be locked in a closed position for lock_duration in seconds | |
semaphore_open = false | |
now = Time.now | |
# insert record if it does not exist yet |
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/perl | |
use Digest::HMAC_MD5 qw/ hmac_md5_hex /; | |
use DBI; | |
use URI::Escape; | |
use CGI; | |
print "Content-type: text/html\n"; | |
my $q = CGI->new; |
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
#sortable-list{margin-top:20px;} | |
#sortable-list li{padding:10px;width:50%;font-weight:bold;cursor:move;border:1px solid #ddd;background:#f5f5f5;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff));background:-ms-linear-gradient(bottom, #eeeeee, #ffffff);background:-moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;} | |
#loading-animation{display:none;} |
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
<style type="text/css"> | |
body.about h1 { /*Let's presume your banner title is an h1 element */ | |
width: 150px; /* Set this to the width of your image */ | |
height: 75px; /* Set this to the height of your image */ | |
background: transparent url('my-image.png') no-repeat top left; /* Change the URL to point to your image */ | |
text-indent: -9999em; /* This ensures that the text itself will not show. */ | |
} | |
</style> | |
<html> |
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
/** | |
* This code should be added to functions.php of your theme | |
**/ | |
add_filter('woocommerce_empty_price_html', 'custom_call_for_price'); | |
function custom_call_for_price() { | |
return 'Call for price'; | |
} |
OlderNewer