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 | |
# DESCRIPTION="Using other scripts, that piece of code imports DBF file into sqlite3 databases. | |
# It's necesary that the data directory was in the same directory than this script" | |
# usage() { | |
# echo -e "\n`basename $0` $sqlitedatabase $data" | |
# echo | |
# echo $DESCRIPTION | |
# echo |
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 | |
// sample to use: php dbf2mysql.php > {filename}.sql | |
$db = false; | |
if($argc >= 2) { | |
$table = 'table'; | |
$iconvFrom = '866'; | |
$iconvTo = 'UTF-8'; |
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 | |
// Path to dbase file | |
$db_path = "dbftable.DBF"; | |
// Open dbase file | |
$dbh = dbase_open($db_path, 0) | |
or die("Error! Could not open dbase database file '$db_path'."); | |
// Get column information | |
$column_info = dbase_get_header_info($dbh); | |
$nfldcount = count($column_info); | |
//create the sql table structure f |
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 | |
/** | |
** Convert DBF files to MySQL file | |
** contact: http://gschimpf.com/ | |
** | |
** USAGE: | |
** $filename = "dir/file.dbf"; | |
** // Show the result sql | |
** dbf2mysql::mostrarSQL($filename); |
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
set :application, "App Name" # Your app name | |
set :repository, "[email protected]:xxxxx/xxx.git" # Your git repository | |
set :document_root, "/home/user/www/awesome_app" | |
set :deploy_via, :remote_cache | |
# SSH Settings | |
set :user, "user_ssh" | |
set :password, "password_ssh" | |
set :use_sudo, false |
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
function __autoload($classe) | |
{ | |
$diretorios = array('class', 'interface'); | |
foreach ( $diretorios as $diretorio ) { | |
if ( file_exists($diretorio . '/' . $classe . '.php') ) { | |
require $diretorio . '/' . $classe . '.php'; | |
break; | |
} |
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
(function() { | |
var script, | |
scripts = document.getElementsByTagName('script')[0]; | |
function load(url) { | |
script = document.createElement('script'); | |
script.async = true; | |
script.src = url; | |
scripts.parentNode.insertBefore(script, scripts); |
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
* Quit Sublime Text 2 (so you don’t accidentally change any settings) | |
* In your Dropbox folder (usually at ~/Dropbox/), add a folder called Sublime Text 2 | |
* Open the folder with your ST2 settings (should be ~/Library/Application Support/Sublime Text 2/) | |
* Copy the following 3 folders into ~/Dropbox/Sublime Text 2/: Installed Packages, Packages, and Pristine Packages | |
* Rename the original 3 folders in ~/Library/Application Support/Sublime Text 2/ to something like Installed Packages-20110119, |
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
# Apache configuration file | |
# http://httpd.apache.org/docs/2.2/mod/quickreference.html | |
# Note: ".htaccess" files are an overhead for each request. This logic should | |
# be placed in your Apache config whenever possible. | |
# http://httpd.apache.org/docs/2.2/howto/htaccess.html | |
# Turning on the rewrite engine is necessary for the following rules and | |
# features. "+FollowSymLinks" must be enabled for this to work symbolically. |
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
function GetWrapedText(text, maxlength) { | |
var resultText = [""]; | |
var len = text.length; | |
if (maxlength >= len) { | |
return text; | |
} | |
else { | |
var totalStrCount = parseInt(len / maxlength); | |
if (len % maxlength != 0) { | |
totalStrCount++ |
OlderNewer