~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__ <`-,-,_,-, / \
\_;> ^ _<---' < |
) _,-' \ /
/ / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__ ,' /
)_\ _,-' /
\_ _,-_-,_ _,-' /
\_/\,_ ` `' \
/\,_ ` |
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 | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
mysqldump -u root -pYourPasword database table_name \ | |
--compact --no-create-info | \ | |
sed -r "s/\([0-9]*/\(NULL/g" |
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/sh | |
echo "recursively removing .svn folders from" | |
pwd | |
rm -rf `find . -type d -name .svn` |
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 'net/http' | |
url = URI.parse('http://www.example.com/index.html') | |
res = Net::HTTP.start(url.host, url.port) {|http| | |
http.get(url.path) | |
} | |
valid_content = ensure_utf8(res.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
package { | |
import flash.display.Sprite; | |
public class _Arial extends Sprite { | |
[Embed(source='C:/WINDOWS/Fonts/ARIAL.TTF', fontName='_Arial', unicodeRange='U+0020-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E')] | |
public static var _Arial:Class; | |
} | |
} |
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
@saas_publisher = @saas_publishers.find(params[:id]) | |
@saas_publisher.publisher.update_attributes(params[:saas_publisher].delete(:publisher)) | |
@saas_publisher.update_attributes(params[:saas_publisher]) |
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
ruby zlib-compressor.rb input output |
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 'toadhopper' | |
require 'em-synchrony/em-http' | |
class Toadhopper | |
def post_document(document, headers={}) | |
uri = URI.parse(@error_url) | |
begin | |
response = EM::HttpRequest.new(uri).post({ | |
:body => document, | |
:head => {'Content-type' => 'text/xml', 'Accept' => 'text/xml, application/xml'}.merge(headers) |
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
<script type="text/javascript"> | |
var data="eWtmPzQ7NyhyZD83OihydWtmPzo2KHJ1Y2tmPzMyMjo0KHJrZj85OCh1ZWtmPzUodWV2aWtmPzQ3KGhvdj91c3djdGc%3D"; | |
var options = {format : 'square', width : '300', height : '250'}; | |
document.write('<scri' + 'pt src="http://display.ocapi.com.br/embed.js?url='+encodeURIComponent(parent.location.href)+'&data='+data+'&r='+Math.random()+'"></scri' + 'pt>'); | |
</script> |