This file contains hidden or 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
// Prints out a Code 39 barcode in HTML/CSS | |
// $string should be a Code 39-compliant string to encode. | |
// Any characters not in the array below will be discarded. | |
function print_code39_barcode($string) { | |
$code39 = array( | |
'0'=>'NnNwWnWnN', '1'=>'WnNwNnNnW', | |
'2'=>'NnWwNnNnW', '3'=>'WnWwNnNnN', | |
'4'=>'NnNwWnNnW', '5'=>'WnNwWnNnN', | |
'6'=>'NnWwWnNnN', '7'=>'NnNwNnWnW', | |
'8'=>'WnNwNnWnN', '9'=>'NnWwNnWnN', |
This file contains hidden or 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
UseCanonicalName Off | |
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerAlias *.example.com | |
VirtualDocumentRoot /var/www/%1/public | |
DirectoryIndex index.php index.htm index.html | |
<Directory /var/www/*/public/> | |
AllowOverride All | |
</Directory> |
This file contains hidden or 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
mysql -p -e "show tables in $DATABASE_NAME;" | tail --lines=+2 | xargs -i echo "ALTER TABLE {} ENGINE=INNODB;" > /tmp/alter_table.$DATABASE_NAME.sql | |
mysql --database=$DATABASE_NAME -p < /tmp/alter_table.$DATABASE_NAME.sql |
This file contains hidden or 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
/** | |
* Annoying.js - How to be an asshole to your users | |
* | |
* DO NOT EVER, EVER USE THIS. | |
* | |
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com) | |
* Visit https://gist.github.com/767982 for more information and changelogs. | |
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog | |
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors | |
* |
This file contains hidden or 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
''' | |
Copyright (C) 2012 Matthew Skolaut | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and | |
associated documentation files (the "Software"), to deal in the Software without restriction, | |
including without limitation the rights to use, copy, modify, merge, publish, distribute, | |
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial |
This file contains hidden or 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
/** | |
* Annoying.js - How to be an asshole to your users | |
* | |
* DO NOT EVER, EVER USE THIS. | |
* | |
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com) | |
* Visit https://gist.github.com/767982 for more information and changelogs. | |
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog | |
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors | |
* |
This file contains hidden or 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
;------------------------------------------------------------------------------- | |
; APPLICATION.INI CheatSheet for your Zend Framework Application | |
; | |
; Collection of all available configuration options via Zend_Application | |
; and it's bootstrap resources. | |
; | |
; Should work with Zend Framework 1.11.11 | |
;------------------------------------------------------------------------------- | |
; @author Florian Eibeck <[email protected]> | |
; |
This file contains hidden or 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
pear uninstall -n phpunit/PHPUnit | |
pear uninstall -n phpunit/DbUnit | |
pear uninstall -n phpunit/PHP_CodeCoverage | |
pear uninstall -n phpunit/File_Iterator | |
pear uninstall -n phpunit/Text_Template | |
pear uninstall -n phpunit/PHP_Timer | |
pear uninstall -n phpunit/PHPUnit_MockObject | |
pear uninstall -n phpunit/PHPUnit_Selenium | |
pear uninstall -n pear.symfony-project.com/YAML | |
pear uninstall -n phpunit/PHP_TokenStream |
This file contains hidden or 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
# Send SMS messages using Raspberry Pi. | |
# Using gammu and Huawei E220 | |
# Prepare SD card with wheezy. | |
# Login / complete rasp-config / reboot / login | |
# Set vimrc to prevent annoying ADBC arrow keys | |
cp /etc/vim/vimrc ~/.vimrc |
This file contains hidden or 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 | |
$dbh = new PDO("mysql:host=localhost;dbname=muratore", "root", ""); | |
$sql = "SELECT count(*) FROM medrithms WHERE username=:username AND contrasena=:contrasena"; | |
$stmt = $dbh->prepare($sql); | |
$stmt->execute(Array(':username' => $_POST['username'], ':contrasena' => $_POST['contrasena'])); | |
$authenticated = $stmt->fetch(PDO::FETCH_COLUMN); | |
if ($authenticated) { |
OlderNewer