Browse | Submit A New Snippet | Create A Package

 

Snippets by category: Database Manipulation

Snippet ID Title
Packages Of Snippets10cms real estateM Ilyas
cms real estate
22Rails PG ProceduresScott Noel-Hemming
Used to create Stored Procedures and adding Trigger Functions to tables in a PostgreSQL database in Rails.
50MS word document manipulationCici Wirachmat
Some snippets written by James Toomey in this ruby-talkposting: http:blade.nagaokaut.ac.jp/cgi-bin/scat-rb/ruby/ruby-talk/60004
55Bulk SMS Gateway, Bulk SMS service provider, SMS Gatewaymnatives bulk sms
Bulk SMS Gateway - mNatives India’s Leading Bulk SMS Service Provider offers you Send Bulk SMS. Bulk SMS solutions can be availed to your business with affordable price SMS gateway providers across the internet. Bulk SMS Reseller service to India, Dubai, Oman, Qatar, Kuwait, Nigeria, UAE, Saudi, Indonesia, Spain, Australia, Middle East, Gulf, Europe
Snippets
17Worlds simplest SQL Server (or MSDE) query codeRalph Mason
This is a very simple way to run a quick query on a sql server. The machine must have the sql server client tools installed (or MSDE)
36Database backupMatthew Linnell
The following script can be used to backup all/part of the contents of a database into a flat text file, by building all the necessary "insert" statements. Useful for backing up specific tables in a DB, or a quick transfer of a DB from one location to another.
40New PostgreSQL database & tables through RubyJames McCarthy
Creating a database in postgreSQL through Ruby
and creating tables within that database
62XBase/DBase Reader classLyndon Samson
A class to allow access to DBase DBF files.
141aggregate_associationsTobias Habermann
A rails plugin that aims to provide active record with functions to combine two has_many associations together (internally by using "(conditions_1) OR (conditions_2)")
151conecta con mysqlEmmanuel Partida Miranda
pequeña función para conectarte a un servidor mysql con php
253Ruby DBF WriterJoe Lobraco
A Ruby function that can write a very basic DBF file.
281Decimal para qualquer baseLIDIA BAZANELLI
Função de conversao de bases: decimal para qualquer base.
282CriptografarLIDIA BAZANELLI
Função pra criptografar / descriptografar
284DRuby on RailsKonstantin Haase
Small script for sharing all your models via druby. Note: You should use ACL + SSL or something for security reason.
234Database Trickle ArchiverJohn Lauck
Archives a mysql database table in small bite size portions. For example, if your database regularly reaches a 4GB limit and you would like to move two weeks of data to another table (tablename_date) that will simply archive the data; this script handles the process at whatever pace suits your system. It defaults to copying and deleting 10 records every 5 seconds, but is customizable.

Provide the database login info, table name and field name for time stamp comparisons to the script along with a time stamp to begin and end. Other options include the number of records per transaction and time to sleep between transactions.

The script requires the following gems: mysql, cooloptions, log4r and strscan.

I've handled a lot of errors and different cases but please test it before you use it on your live database!

Contributions to the code are very welcome. My top priority is to abstract the fixed time variables so it's possible to easily archive 2 weeks, 1 week or 1 day (etc) prior. This would be extremely helpful since it would make it simple to add cron jobs for schedule d archives. I'm sure there are plenty of other possible extensions. Feel free to tinker.
458IP2Location Ruby LibraryHexa How
IP2Location Ruby Library enables the user to find the Country, Region, City, Latitude, Longitude, ZIP code, Time zone, ISP, Domain name, Connection type, Area code and Weather station code of the location that any IP address or hostname originates from. This API is meant to allow easy integration between your program written in Ruby and
the IP2Location Binary (.BIN) data file. It has been optimized for speed and memory utilization. Developers can use the API to query all IP2Location™ binary databases for applications written in C or supporting static/dynamic library. Get more geolocation information at http://www.ip2location.com .
515True Religion OutletReligion Outlet True
hj to make this article to m
531restaurants davao, hotel davao, resort davaomarry lessey
jehn rajohn
17149 Fresno St.
California
572virtapay2 and RubyCici Wirachmat
Some snippets written by James Toomey in this Ruby-talkposting