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 use the first | |
—– BEGIN LICENSE —– | |
Michael Barnes | |
Single User License | |
EA7E-821385 | |
8A353C41 872A0D5C DF9B2950 AFF6F667 | |
C458EA6D 8EA3C286 98D1D650 131A97AB | |
AA919AEC EF20E143 B361B1E7 4C8B7F04 |
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 | |
require_once __DIR__ . '/../vendor/autoload.php'; | |
use Kishanio\CCAvenue\Payment as CCAvenueClient; | |
$ccavenue = new CCAvenueClient( '<merchant_id>', '<working_key>', '<redirect_url>' ); | |
// set details | |
$ccavenue->setAmount( '<Amount>' ); | |
$ccavenue->setOrderId( '<order_id>' ); |
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 | |
$files = array_slice($argv, 1); | |
foreach ($files as $file) { | |
$picture = file_get_contents($file); | |
$size = getimagesize($file); | |
// base64 encode the binary data, then break it into chunks according to RFC 2045 semantics | |
$base64 = chunk_split(base64_encode($picture)); |
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 | |
/** | |
* A very simple autoloader | |
*/ | |
class Autoloader | |
{ | |
/** | |
* Only use this class statically. | |
* @ignore |
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
try { | |
Class.forName(driver); | |
Connection con = DriverManager.getConnection(url + db, user, pass); | |
Statement stmt = con.createStatement(); | |
ResultSet rs = stmt.executeQuery(query); | |
ResultSetMetaData rsmd = rs.getMetaData(); | |
List<String> columns = new ArrayList<String>(rsmd.getColumnCount()); | |
for(int i = 1; i <= rsmd.getColumnCount(); i++){ | |
columns.add(rsmd.getColumnName(i)); | |
} |
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 | |
// rewrite /wp-content/themes/theme-name/css/ to /css/ | |
// rewrite /wp-content/themes/theme-name/js/ to /js/ | |
// rewrite /wp-content/themes/theme-name/img/ to /img/ | |
// rewrite /wp-content/plugins/ to /plugins/ | |
function roots_flush_rewrites() { | |
global $wp_rewrite; | |
$wp_rewrite->flush_rules(); | |
} |