Skip to content

Instantly share code, notes, and snippets.

View DECRS.ASM
.title "DECODIFICADOR REED-SOLOMON 63-48"
;
.global R_S
.global a_tabla,a_mult
.global a_inRS,a_salida
;
i .set 2 ; Interleaving entre codigos
j .set 2 ; Interleaving de canal
;
.bss sindromes,63 ; Transformada de entrada + extension
View gist:3174c20805978896d250
<!DOCTYPE HTML>
<html>
<head>
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&sensor=false"></script>
<script>
function geoLocate() {
if (window.navigator && window.navigator.geolocation) {
window.navigator.geolocation.getCurrentPosition(function(position){
getAddress(position.coords);
View nginx.conf
### If a bot requests an escaped URL then rewrite the request to SEO4Ajax location
if ($args ~ _escaped_fragment_) {
rewrite ^(.*)$ /seo4ajax$1 last;
}
### SEO4ajax location to handle proxyfication to SEO4Ajax API
location /seo4ajax/ {
rewrite ^/seo4ajax/(.*) /seo4ajax_key/$1 break;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host api.seo4ajax.com;
@diecrf
diecrf / gist:1170410
Created Aug 25, 2011
Delete unused images in a rails project
View gist:1170410
images = Dir.glob('public/images/*')
images.each do |image|
unless File.directory?(image)
puts "Checking #{image}..."
if IO.popen("ack-grep -1 -G '(app|public)' --ruby --html --css #{File.basename(image)}").eof?
IO.popen("svn delete #{image}")
puts " Deleted"
end
end
View gist:805590
namespace :db do
desc "Download the a full dump of the production database into the development database"
task :pull do
config = YAML::load(File.open(File.join('config', 'database.yml')))
dump_database_remotely(config['production'], remote_file)
compress_backup_remotely(remote_file)
download_backup(remote_file(:compressed), local_file(:compressed))
@diecrf
diecrf / .irbrc.rb
Created May 15, 2010 — forked from iain/.irbrc.rb
irbrc.rb
View .irbrc.rb
# IRBRC file by Iain Hecker, http://iain.nl
# put all this in your ~/.irbrc
require 'rubygems'
require 'yaml'
alias q exit
class Object
def local_methods
(methods - Object.instance_methods).sort