Skip to content

Instantly share code, notes, and snippets.

View gedex's full-sized avatar
🏠
Working from home

Akeda Bagus gedex

🏠
Working from home
View GitHub Profile
@gedex
gedex / -
Created April 27, 2016 05:21
Archive: trunk/product-packages/woocommerce-subscriptions/woocommerce-subscriptions.zip 1119640 249
drwx--- 0.0 fat 0 bx stor 23-Apr-16 04:55 woocommerce-subscriptionsassets/
drwx--- 0.0 fat 0 bx stor 23-Apr-16 04:55 woocommerce-subscriptionsassets/css/
-rw---- 0.0 fat 4006 tx defN 23-Apr-16 04:55 woocommerce-subscriptionsassets/css/about.css
-rw---- 0.0 fat 20355 tx defN 23-Apr-16 04:55 woocommerce-subscriptionsassets/css/admin.css
-rw---- 0.0 fat 419 tx defN 23-Apr-16 04:55 woocommerce-subscriptionsassets/css/checkout.css
-rw---- 0.0 fat 867 tx defN 23-Apr-16 04:55 woocommerce-subscriptionsassets/css/wcs-upgrade.css
-rw---- 0.0 fat 2193 tx defN 23-Apr-16 04:55 woocommerce-subscriptionsassets/css/woocommerce-subscriptions.css
drwx--- 0.0 fat 0 bx stor 23-Apr-16 04:55 woocommerce-subscriptionsassets/images/
-rw---- 0.0 fat 40200 bx defN 23-Apr-16 04:55 woocommerce-subscriptionsassets/images/add-edit-subscription-screen.png
@gedex
gedex / README.md
Last active April 17, 2016 06:20
Max clients in net/http
This file has been truncated, but you can view the full file.
Index: braintree_sdk/CHANGELOG.md
===================================================================
--- braintree_sdk/CHANGELOG.md (revision 1387260)
+++ braintree_sdk/CHANGELOG.md (working copy)
@@ -1,3 +1,25 @@
+## 3.8.0
+* Add payment method revoke
+* Add support for options in `submit_for_settlement` transaction flows
+* Add verification create API
+* Update https certificate bundle
function my_stripe_custom_callback( data ) {
alert( data.response.error.message );
data.form.unblock();
}
<?php
function bench_get_user_unpublished_posts( $n = 100 ) {
$text = "| %-20.20s | %-20.20s | %-20.20s\n";
printf( $text, 'Method', 'MemUsage', 'ExecTime' );
printf( $text, 'WP_Query', get_user_unpublished_posts_mem_usage_avg( $n, 'get_user_unpublished_posts_using_wp_query' ), get_user_unpublished_posts_exec_time_avg( $n, 'get_user_unpublished_posts_using_wp_query' ) );
printf( $text, 'WPDB', get_user_unpublished_posts_mem_usage_avg( $n, 'get_user_unpublished_posts_using_wpdb' ), get_user_unpublished_posts_exec_time_avg( $n, 'get_user_unpublished_posts_using_wpdb' ) );
}
<?php
/**
* Generate Data (users and posts).
*/
class Gen_Data_Command extends WP_CLI_Command {
const DEFAULT_GEN_NUM_USERS = 2;
const DEFAULT_GEN_NUM_POSTS = 1;
const GEN_USERS_OPTION = 'gen_data_users';
@gedex
gedex / main.go
Created April 17, 2015 17:52
HTTP server that increments counter and serves the page with the counter rendered. Useful for verification if you've component that fetch external content with TTL.
package main
import (
"flag"
"fmt"
"log"
"net/http"
"time"
)
@gedex
gedex / find.go
Last active August 29, 2015 14:17
find.go
// Package bench is a package which contains
// programs of Go Benchmark Competition.
package bench
import (
"bufio"
"errors"
"fmt"
"os"
"strings"
@gedex
gedex / gist:60db170329eabd0d65a1
Created November 23, 2014 06:44
WTF Meetup.com?

WTF!

Each newly-created Meetup Group is reviewed to make sure it's a good fit for the platform.

Jakarta Go Meetup is not in line with our Group Policies. You can check them out here: http://meetu.ps/1CwmJ2

It's important that all Meetup Groups are facilitated in person by a local Organizer and are focused on building local community and connections. As a result, we've closed your Meetup Group. This decision is final.

Meetup reserves the right, in our sole discretion, to remove members, groups, or content from the site that violates our Terms of Service: http://www.meetup.com/terms/ >

@gedex
gedex / deploy-to-wp-org.sh
Created November 19, 2014 19:32
deploy-to-wp-org.sh
#! /bin/bash
# See https://github.com/GaryJones/wordpress-plugin-git-flow-svn-deploy for instructions and credits.
echo
echo "WordPress Plugin Git-Flow SVN Deploy v1.0.0-dev2"
echo
echo "Step 1. Let's collect some information first."
echo
echo "Default values are in brackets - just hit enter to accept them."
echo