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/python -O | |
################################################################################ | |
################################################################################ | |
# | |
# State-Based Text Merging Algorithm | |
# For 6.033 Design Project 2 | |
# TA: Katherine Fang | |
# 9 May 2012 | |
# |
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
vendor |
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
<blockquote class="twitter-tweet" lang="en"><p>Scale your web apps using SaltStack to manage software & infra across any cloud provider: <a href="http://t.co/5qag27EACL">http://t.co/5qag27EACL</a> A talk by <a href="https://twitter.com/walterdalmut">@walterdalmut</a></p>— SaltStack (@SaltStackInc) <a href="https://twitter.com/SaltStackInc/status/471372896514736130">May 27, 2014</a></blockquote> | |
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script> |
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
// | |
// Multithreaded Hello World server. | |
// | |
package main | |
import ( | |
zmq "github.com/pebbe/zmq4" | |
"fmt" |
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
/* | |
* RC4 symmetric cipher encryption/decryption | |
* | |
* @license Public Domain | |
* @param string key - secret key for encryption/decryption | |
* @param string str - string to be encrypted/decrypted | |
* @return string | |
*/ | |
function rc4(key, str) { | |
var s = [], j = 0, x, res = ''; |
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
# lib/puppet/parser/functions/pw_hash.rb | |
module Puppet::Parser::Functions | |
newfunction(:pw_hash, type: :rvalue) do |args| | |
raise Puppet::ParseError, "pw_hash takes exactly two arguments, #{args.length} provided" if args.length != 2 | |
# SHA512 ($6), default number of rounds (5000) | |
# rounds could be specified by prepending rounds=<n>$ parameter before the salt, i.e. | |
# args[0].crypt("$6$rounds=50000$#{args[1]}") | |
args[0].crypt("$6$#{args[1]}") | |
end |
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
doctrine: | |
dbal: | |
driver_class: Corley\DBAL\Driver\InfluxDB | |
host: %database_host% | |
port: %database_port% | |
dbname: %database_name% | |
user: %database_user% | |
password: %database_password% | |
orm: |
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 | |
$filename = dirname(__FILE__) . '/allCountries.txt'; | |
$file = new SplFileObject($filename ,'r'); | |
$map = array( | |
0 => 'id', | |
1 => 'name', | |
2 => 'asciiName', | |
3 => 'alternateNames', | |
4 => 'latitude', |
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 | |
class Application_Date | |
extends Zend_Date | |
{ | |
public static function nextDay($dayWanted) | |
{ | |
$weekdays = array('sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'); | |
if (!in_array($dayWanted, $weekdays)) { | |
throw new Zend_Exception("'{$dayWanted}' not found in array of possible weekdays"); | |
} |
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
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/' |
OlderNewer