Skip to content

Instantly share code, notes, and snippets.

View foxinni's full-sized avatar

Foxinni foxinni

View GitHub Profile
r = reversed(s)
for i in r:
print(i, end='')
for i in r:
print(i, end='')
# Second loop not printing?
@foxinni
foxinni / Main.hx
Last active August 29, 2015 14:26
HaXe Luxe Button Example with Hover and Click
import luxe.Input;
import luxe.Sprite;
import luxe.Color;
import luxe.Component;
import luxe.tween.Actuate;
import luxe.Vector;
class HoverAlpha extends Component {
@foxinni
foxinni / contentscript.js
Created August 21, 2012 08:23
Javascript from the Schema Explorer Chrome Extension
/*
Content Script
*/
(
function (document, window)
{
var __dataTree = [];
@foxinni
foxinni / better wp_dropdown_categories() for taxonomies
Created June 13, 2012 07:47
Modify wp_dropdown_categories() to support taxonomy->slug in select output, and not taxonomy->id.
<?php
/*
Background: My company post type needed a filter added via the 'restrict_manage_posts' action, and I needed to modify the wp_dropdown_categories to output the taxonomy slug into the <option value="..."> instead of the taxonomy ID. The taxonomy being 'industry'.
The SH_Walker_TaxonomyDropdown() can be found here: https://gist.github.com/2902509
*/
function restrict_listings_by_taxonomy() {
global $typenow;
global $wp_query;