Setup remote repository:
ssh [email protected]
mkdir my_project.git
cd my_project.git
git init --bare
On local machine:
cd my_project
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>tableToExcel Demo</title> | |
<script src="tableToExcel.js"></script> | |
</head> | |
<body> | |
<h1>tableToExcel Demo</h1> | |
<p>Exporting the W3C Example Table</p> |
# ************************************************************ | |
# Sequel Pro SQL dump | |
# Version 3408 | |
# | |
# http://www.sequelpro.com/ | |
# http://code.google.com/p/sequel-pro/ | |
# | |
# Host: 127.0.0.1 (MySQL 5.1.44) | |
# Database: blog_tests | |
# Generation Time: 2011-10-08 18:00:24 +0200 |
Setup remote repository:
ssh [email protected]
mkdir my_project.git
cd my_project.git
git init --bare
On local machine:
cd my_project
#!/bin/bash | |
if [ ! -n $1 ]; then | |
echo "Must specify a value" | |
exit 1 | |
fi | |
for var in "$@" | |
do | |
code=`echo $var | tr 'a-z' 'A-Z'` |
.grid-block{ | |
width: 50px; | |
height: 50px; | |
margin: 1px; | |
display: inline-block; | |
background-color: black; | |
-moz-user-select: none; | |
-webkit-user-select: none; | |
-o-user-select: none; | |
user-select: none; |
import json | |
import os | |
import time | |
import requests | |
from PIL import Image | |
from StringIO import StringIO | |
from requests.exceptions import ConnectionError | |
def go(query, path): | |
"""Download full size images from Google image search. |
#!/bin/bash | |
if [ "$1" == "" ]; then | |
echo Usage: $0 pngfile | |
exit 0; | |
fi | |
FILE=`basename $1 .png` | |
if [ ! -e $FILE.png ]; then |
<?php | |
/* PHP class for uploading file via FTP wich automatically make non-exist directory recursively */ | |
<?php | |
class FTPUploader { | |
private static function make_directory($ftp_stream, $dir) | |
{ | |
// if directory already exists or can be immediately created return true | |
if (FTPUploader::ftp_is_dir($ftp_stream, $dir) || @ftp_mkdir($ftp_stream, $dir)) return true; |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |