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
/** | |
* I was trying to load fixed-structure plist files like this: | |
* \code{.xml} | |
* <?xml version="1.0" encoding="UTF-8"?> | |
* <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
* <plist version="1.0"> | |
* <array> | |
* <dict> | |
* <key>id</key> | |
* <string>ID-0</string> |
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 | |
$photos = array(); | |
// $photos comes with a list of files (maybe with their absolute path) | |
// of images (here they are jpeg files!) to output | |
// http://en.wikipedia.org/wiki/Motion_JPEG | |
// https://github.com/berak/netcam/blob/master/netcam/main.cpp |
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
import httplib | |
import cgi | |
from mod_python import apache | |
import mod_python | |
import string | |
import os.path | |
import sys | |
import time | |
from time import gmtime | |
from time import strftime |
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
#!/usr/bin/python | |
# Script to import video from Panasonic SDR-H20 Camera | |
# This script is the same as SDCopy.exe utility in Windows | |
# Script copies mod files, renames them to "YYYY-MM-DD HH-MM.mpg" pattern, where "YYYY-MM-DD HH-MM" is creation time | |
# Script also can optionally set aspect ratio flag | |
# Made by m0sia (m0sia@plotinka.ru) | |
# Modified by lidio601 | |
import os |
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
#!/usr/bin/python | |
from random import random | |
dadi = 4 | |
# array >>> [1, 2, 3, 4] | |
ncol = 3 | |
sol = [] |
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
#!/opt/local/bin/python2.4 | |
from appscript import * | |
import shutil | |
import os | |
itunes = app('itunes') | |
# nome della playlist da copiare | |
playlist_name = "toUSB" |
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
UserInterfaceState.xcuserstate | |
Thumbs.db | |
*~ | |
.git | |
.DS_Store | |
*.xcuserdatad | |
UserInterfaceState.xcuserstate |
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
#!/usr/sbin/python | |
#encoding=utf8 | |
import string, os, sys | |
SEPARATOR = """-- Current Database: `""" | |
def sep(str0): | |
if not str0.startswith(SEPARATOR) and SEPARATOR in str0: | |
return (str0,'','') |
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
$ch = curl_init("http://www.google.it/") ; | |
curl_setopt ($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); | |
curl_setopt($ch, CURLOPT_HTTPGET, 1); | |
$str = curl_exec($ch); | |
curl_close($ch); | |
$str = substr($str,strpos(str_replace("\"","",$str),'id=logo')-100); | |
$str = substr($str,strpos($str,'<img ')); |
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 | |
cd "/path/to/your/backup/directory" | |
mysqldump -u "<DATABASE-USER>" -p "<DATABASE-NAME>" >"`date +%Y%m%d`_database.sql" | |
tar czvf "`date +%Y%m%d`_htdocs.tar.gz" "/path/to/your/htdocs/directory" |
OlderNewer