<!-- An individual link -->
<a href="http://pinterest.com/pin/create/button/?url=http%3A%2F%2Funitedway.com&media=http%3A%2F%2Fplacehold.it%2F200x200&description=A%20description." class="pin-it-button" count-layout="horizontal"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>
<!-- before </body> -->
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 | |
namespace modules\productexporter\elements\exporters; | |
use Craft; | |
use craft\base\ElementExporter; | |
use craft\elements\db\ElementQueryInterface; | |
/** | |
* Products Exporter element exporter |
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 | |
# usage: | |
# $ das_download.rb email password | |
# based on various gists from this thread https://gist.github.com/maca/1798070 | |
require "mechanize" | |
require "nokogiri" | |
require "fileutils" | |
class DasDownloader |
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 | |
namespace Craft; | |
$craft = require '../craft/app/bootstrap.php'; | |
$craft->plugins->loadPlugins(); | |
$productIds = craft()->elements->getCriteria('Commerce_Product', ['limit' => null])->ids(); | |
// Configuration |
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
var randomNumbers = [42, 12, 88, 62, 63, 56, 1, 77, 88, 97, 97, 20, 45, 91, 62, 2, 15, 31, 59, 5] | |
func partition(v: Int[], left: Int, right: Int) -> Int { | |
var i = left | |
for j in (left + 1)..(right + 1) { | |
if v[j] < v[left] { | |
i += 1 | |
(v[i], v[j]) = (v[j], v[i]) | |
} | |
} |
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 script redirects all the links via blankrefer.com - except for the sites that were included in the protected_links string | |
//Example: | |
//var protected_links = "myspace,ebay"; | |
var protected_links = ""; | |
var a_to_va = 0; | |
var a_to_vb = 0; | |
var a_to_vc = ""; | |
function blank_refer() | |
{ |
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
1.CentOS 6.3 | |
#yum install make gcc | |
#cd /opt | |
$wget http://redis.googlecode.com/files/redis-2.x.xx.tar.gz | |
$tar zxf redis-2.x.xx.tar.gz | |
$cd redis-2.x.xx | |
$make | |
$make install | |
////// |
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
require 'mechanize' | |
@username = 'username@email' | |
@password = 'password' | |
@download_path = File.expand_path 'downloads' | |
@wget_cookie = File.expand_path(File.dirname(__FILE__)) + '/wget-cookies.txt' | |
unless File.directory? @download_path | |
puts "@{download_path} doesn't exist!" | |
exit |
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
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
NewerOlder