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 | |
# TYPO3 => TCA | |
# suggest wizzard pattern | |
# in tca.php | |
$TCA['table'] = array( | |
'columns' => array( | |
'field' => array( | |
'exclude' => 1, |
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 stopReturnKey(evt) { | |
var evt = (evt) ? evt : ((event) ? event : null); | |
var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); | |
if ((evt.keyCode == 13) && (node.type=="text")) {return false;} | |
} | |
document.onkeypress = stopReturnKey; |
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
var o = new Array(); | |
o["un"] = 1; | |
o["deux"] = 2; | |
console.log(o.un) | |
console.log(o["deux"]); |
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 | |
[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click* |
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
var imageAddr = "http://www.tranquilmusic.ca/images/cats/Cat2.JPG" + "?n=" + Math.random(); | |
var startTime, endTime; | |
var downloadSize = 5616998; | |
var download = new Image(); | |
download.onload = function () { | |
endTime = (new Date()).getTime(); | |
showResults(); | |
} | |
startTime = (new Date()).getTime(); | |
download.src = imageAddr; |
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
$('input.theClass:checked').map(function(){return this.value}).get().join(','); |
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 | |
for i in {2014..2024}; do paste <(ncal -e $i) <(ncal -o $i);done; |
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
$('iframe').contents().find('html').html(data); |
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
# Count first | |
SELECT count(1) FROM tx_powermail_mails WHERE (tstamp > unix_timestamp(STR_TO_DATE('01:00:00','%d/%m/%Y %H:%i:%s'))) AND (tstamp < unix_timestamp(STR_TO_DATE('01:01:00','%d/%m/%Y %H:%i:%s'))) ORDER BY FROM_UNIXTIME(tstamp) ASC; | |
# Get dates | |
SELECT FROM_UNIXTIME(tstamp) FROM tx_powermail_mails WHERE (tstamp > unix_timestamp(STR_TO_DATE('01:00:00','%d/%m/%Y %H:%i:%s'))) AND (tstamp < unix_timestamp(STR_TO_DATE('01:01:00','%d/%m/%Y %H:%i:%s'))) ORDER BY time_send ASC; |
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 | |
# Define constants | |
DBTODUMP=mydb | |
MYUSER=mydb | |
MYPASSWORD=mydb | |
MYTABLESEXCEPT="'t1','t2','t3'" | |
MYDBPATH=mydb_tables.sql | |
MYACL="-u${MYUSER} -p${MYPASSWORD}" |