Skip to content

Instantly share code, notes, and snippets.

View simonblee's full-sized avatar

Simon Blee simonblee

View GitHub Profile
@wilhelm-murdoch
wilhelm-murdoch / JSONCountries.json
Created December 6, 2010 02:45
Here is a JSON object which contains a list of all countries and their associated abbreviations. Thought others might find this useful.
[
{"US":"United States"},
{"CA":"Canada"},
{"AF":"Afghanistan"},
{"AL":"Albania"},
{"DZ":"Algeria"},
{"DS":"American Samoa"},
{"AD":"Andorra"},
{"AO":"Angola"},
{"AI":"Anguilla"},
@davidnunez
davidnunez / gist:1404789
Created November 29, 2011 13:20
list all installed packages in android adb shell
pm list packages -f
@oodavid
oodavid / README.md
Created March 26, 2012 17:05
Backup MySQL to Amazon S3

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc

@codearachnid
codearachnid / acf_repeater_dynamic_where.php
Last active December 25, 2015 02:59
Fix Advanced Custom Field dynamic key filter for repeater entries automagically. See example 5 http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/
<?php
/*
* Fix Advanced Custom Field dynamic key filter for repeater entries
* @link http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/
*/
add_filter( 'posts_where', 'acf_repeater_dynamic_where', 10, 2 );
function acf_repeater_dynamic_where( $where, &$wp_query ){
if( !empty( $wp_query->meta_query->queries ) ){
$keys = wp_list_pluck( $wp_query->meta_query->queries, "key" );
@dakom
dakom / ECS notes.md
Last active May 27, 2024 10:42
ECS with sparse array notes (EnTT style)

Intro

The below is a breakdown / bird's eye view of how a sparse-array backed ECS like EnTT or Shipyard works.

Please see the thanks and references at the bottom - without their help I would not have been able to share this breakdown with you... everything here is really just notes and rephrasing of what they've written already :)

Also, these notes do not cover archetype systems (like unity) nor adaptations of archetypes (like in Flecs). Though there's a couple comparative footnotes at the end.

Here we go!