El archivo mejorado y actualizado ahora puede ser visto en https://github.com/gcorreaq/snippets/tree/main/roman-to-decimal-numbers
This file contains hidden or 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
| ''' | |
| Author : Jay Rambhia | |
| email : jayrambhia777@gmail.com | |
| twitter: @jayrambhia | |
| ''' | |
| import os | |
| import time | |
| import threading | |
| import sys | |
| from multiprocessing import Process |
This file contains hidden or 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 | |
| URL='http://www.sec.gov/cgi-bin/browse-edgar?company=facebook&match=&CIK=&filenum=&State=&Country=&SIC=&owner=exclude&Find=Find+Companies&action=getcompany' | |
| alias fb_sec='curl $URL' | |
| PREIPO=`fb_sec` | |
| while : ; | |
| do | |
| sleep 10s | |
| IPO=`fb_sec` | |
| if [[ "$IPO" != "$PREIPO" ]] |
This file contains hidden or 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' | |
| require 'open-uri' | |
| require 'nokogiri' | |
| require 'uri' | |
| class Crawler | |
| attr_accessor :visited_links, :links_to_visit | |
| def initialize(starting_link) | |
| self.visited_links = [] | |
| self.links_to_visit = [] |
This file contains hidden or 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
| import pygtk | |
| pygtk.require('2.0') | |
| import gtk | |
| import os | |
| class TextBox: | |
| def __init__(self): | |
| self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) | |
| self.window.set_size_request(200,250) | |
| self.window.connect("destroy", self.close_application) |
This file contains hidden or 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 | |
| # ws.sh Web Server in Shell Scripting | |
| # @author: maop www.maop.mx | |
| # INSTALL: Just add to your /etc/inetd.conf: | |
| # http-alt stream tcp nowait nobody /home/maop/Proyectos/ws-sh/ws.sh | |
| # restart inetd and launch your browser to 127.0.0.1:8080 | |
| # --[ Config ]-- | |
| htdocs="/home/maop/Proyectos/ws-sh" |
This file contains hidden or 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
| README | |
| (c) 2012 Mauro Parra-Miranda | |
| This is an example of what you can do with processingjs+phonegap+windows phone. I hope you enjoy. | |
| INSTALL INSTRUCTIONS | |
| - Get the Windows Phone Development tools, no developer account needed to see this in the emulator: http://msdn.microsoft.com/en-us/library/ff402535(v=vs.92).aspx | |
| - Get the latest phonegap (I'm using 1.7 now), from: http://phonegap.com/download |
This file contains hidden or 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 domKiller = { | |
| hiddenElements: [], | |
| activated: false, | |
| /** | |
| * Initialize and activate the remove action when clicking simultaneously on left and middle mouse button and the hide action when clicking on the left mouse button | |
| */ | |
| init: function () { |
This file contains hidden or 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
| // Ways to prevent SQL Injections in PHP (http://php.net/manual/en/security.database.sql-injection.php) | |
| 1. "Never connect to the database as a superuser or as the database owner. Use always customized users with very limited privileges." | |
| 2. "Check if the given input has the expected data type. PHP has a wide range of input validating functions, from the simplest ones found in Variable Functions and in Character Type Functions" (e.g. is_numeric(), ctype_digit() | |
| 3. "Quote each non numeric user supplied value that is passed to the database with the database-specific string escape function" (e.g. mysql_real_escape_string(), sqlite_escape_string(), etc.). "If a database-specific string escape mechanism is not available, the addslashes() and str_replace() functions may be useful (depending on database type)." | |
| <?php |
This file contains hidden or 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 | |
| # spinner.sh | |
| # A simple spinner in your terminal. | |
| SPINS=( | |
| "ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgKiUlJSUlJSUlIyAgICAgICAgICAgICAgICAgICAgKCUlJSUlJSUlJSggICAgICAgICAgICAgICAKICAgICAgICAgICAgKiUlICAgLCgoKiAgICMlIyAgICAgICAgICAgICAgLiUlICAgKCUlJSguICAlJSwgICAgICAgICAgICAKICAgICAgICAgICAlJSAuJSUlJSUlJSUlJS8gLyUsICAgICAgICAgICAlJSAgJSUlJSUlJSUlJSUgICUlICAgICAgICAgICAKICAgICAgICAgICUoICUlJSMgLyUlKCAvJSUlIC4lJS8gICAgICAgIyUlICglJSUgIyUlJSggJSUlKCAlJSAg |
OlderNewer