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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
$searchArgs = array( | |
'post_type' => 'post', | |
'meta_query' => | |
array( 'relation' => 'AND', | |
array( 'key' => 'Source URL', 'value' => $postguid ), | |
array( 'key' => 'Source post ID', 'value' => $postid ) | |
) | |
); |
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
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; |
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
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() { |
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
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; |
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
function addJQuery(callback) { | |
var script = document.createElement("script"); | |
script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"); | |
script.addEventListener('load', function() { | |
var script = document.createElement("script"); | |
script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();"; | |
document.body.appendChild(script); | |
}, false); | |
document.body.appendChild(script); | |
} |
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
<script> | |
/* | |
alter_branding.js | |
webteam UTM | |
last updated 21 september 2014 , 11:41 pm | |
*/ | |
(function(jQuery){ |
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
var thisClass = Type.getClass(this); | |
var b = Type.getInstanceFields(thisClass); | |
for (i in 0...b.length) | |
{ | |
trace(b[i]); | |
trace(Reflect.field(this,b[i])); | |
} |
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
{ | |
"bkc_checker":{"version":1}, | |
"software":"Haxe[4rc4] + Heaps[git] + HL[1.10.0] + hlsdl[1.10.0]", | |
"meta":["Tested OS : Windows 10"], | |
"checker":{ | |
"Haxe4.0_rc4":{ | |
"cmdline":"haxe --version", | |
"expected_stdout": "<SEARCH>4.0.0-rc.4+97f1e1a9d", | |
"common_issue":[ | |
"Haxe is not installed. Please download & install Haxe from url => https://haxe.org/download/version/4.0.0-rc.4/" |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"time" | |
"github.com/gorilla/websocket" | |
) |
OlderNewer