List directly imported packages
go list -f '{{ join .Imports "\n" }}'
List all subdependencies
go list -f '{{ join .Deps "\n" }}'
List directly imported packages
go list -f '{{ join .Imports "\n" }}'
List all subdependencies
go list -f '{{ join .Deps "\n" }}'
-- http://stackoverflow.com/questions/876522/creating-a-copy-of-a-database-in-postgresql | |
CREATE DATABASE newdb WITH TEMPLATE currentdb OWNER dbuser; |
# make stamp | |
convert -size 300x50 xc:grey30 -font Arial -pointsize 50 -gravity center \ | |
-draw "fill grey70 text 0,0 'SomeText'" \ | |
stamp_fgnd.png | |
convert -size 300x50 xc:black -font Arial -pointsize 50 -gravity center \ | |
-draw "fill white text 1,1 'SomeText' \ | |
text 0,0 'SomeText' \ | |
fill black text -1,-1 'SomeText'" \ | |
+matte stamp_mask.png | |
composite -compose CopyOpacity stamp_mask.png stamp_fgnd.png stamp.png |
<?php | |
define('DB_NAME' , 'dbname' ); | |
define('DB_USER' , 'user' ); | |
define('DB_PASSWORD', 'pwd' ); | |
define('DB_HOST' , 'localhost'); | |
$con=mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD); | |
// Check connection | |
if (mysqli_connect_errno()) | |
{ |
<?php | |
$zip = new ZipArchive; | |
$res = $zip->open('file.zip'); | |
if ($res === TRUE) { | |
$zip->extractTo('/myzips/extract_path/'); | |
$zip->close(); | |
echo 'woot!'; | |
} else { | |
echo 'doh!'; | |
} |