Skip to content

Instantly share code, notes, and snippets.

View golchha21's full-sized avatar

Ulhas Vardhan Golchha golchha21

View GitHub Profile
@angrycoffeemonster
angrycoffeemonster / Sublime Text 3 Build 3103 License Key - CRACK
Created April 18, 2016 02:13
Sublime Text 3 Build 3103 License Key - CRACK
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
@kishanio
kishanio / pay.php
Last active July 7, 2022 05:43
CCAvenue PHP Library
<?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>' );
@jasny
jasny / image-embed-html.php
Created October 23, 2012 10:40
Create base64 encoded image to embed in HTML
<?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));
@jasny
jasny / Autoloader.php
Created October 19, 2012 14:38
Autoloader for PHP
<?php
/**
* A very simple autoloader
*/
class Autoloader
{
/**
* Only use this class statically.
* @ignore
@rrguntaka
rrguntaka / resultset_to_map.java
Created August 15, 2012 15:27
JDBC Result set to Java HashMap
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));
}
@wycks
wycks / gist:2315295
Created April 6, 2012 00:08
Rewrite static theme assets and plugins directory (WordPress)
<?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();
}