Skip to content

Instantly share code, notes, and snippets.

View misterpah's full-sized avatar
😲
you can put status on github now ?!

pah arif misterpah

😲
you can put status on github now ?!
View GitHub Profile
@misterpah
misterpah / main.hx
Created June 3, 2014 17:18
crashdumper in flash
package;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.Lib;
import flixel.FlxGame;
import flixel.FlxState;
import openfl.Lib;
import haxe.macro.Context;
import haxe.macro.Expr;
class ClassNameHelper {
macro static public function getClassName():ExprOf<String> {
return { expr: EConst(CString(Context.getLocalClass().toString())), pos: Context.currentPos() }
}
}
class Test {
public static function main() {
function get_terms_for_customPost($taxonomies, $args=array() ){
//Parse $args in case its a query string.
$args = wp_parse_args($args);
if( !empty($args['post_types']) ){
$args['post_types'] = (array) $args['post_types'];
add_filter( 'terms_clauses','wpse_filter_terms_by_cpt',10,3);
function wpse_filter_terms_by_cpt( $pieces, $tax, $args){
global $wpdb;
$searchArgs = array(
'post_type' => 'post',
'meta_query' =>
array( 'relation' => 'AND',
array( 'key' => 'Source URL', 'value' => $postguid ),
array( 'key' => 'Source post ID', 'value' => $postid )
)
);
@misterpah
misterpah / 0_reuse_code.js
Created May 20, 2014 04:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console