Skip to content

Instantly share code, notes, and snippets.

View kontur's full-sized avatar

Johannes Neumeier kontur

View GitHub Profile
@companje
companje / globe.cpp
Created September 24, 2014 13:31
getting Longitude/Latitude when clicking on a rotated sphere
#include "ofMain.h"
class ofApp : public ofBaseApp {
public:
ofImage earth;
ofQuaternion qTo;
float angle;
ofVec3f axis;
ofPoint green;
@prestonparris
prestonparris / reactjs-conf-2015-notes.md
Last active April 6, 2017 21:32
Notes from the 2015 React.js Conference

Reactjs conf 2015 Notes

  • react native announced

    • Allows you to use react style javascript to target native ios and android, native views, live reloading
    • intro pt1
    • intro pt2
    • facebook groups app uses react native with graphql and relay
  • realtime page tweaking

    • rethink best practices and workflows
  • inmutability is a good idea

@LaurenaRehbein
LaurenaRehbein / stripe-icon-edit.php
Created January 12, 2018 00:12
A sample of the edited function
add_filter( 'wc_stripe_payment_icons', 'change_my_icons' );
function change_my_icons( $icons ) {
// var_dump( $icons ); to show all possible icons to change.
$icons['visa'] = '<img src="http://woocommerce-ext.reh/wp-content/plugins/woocommerce/assets/images/icons/credit-cards/visa.svg" />';
$icons['mastercard'] = '<img src="http://woocommerce-ext.reh/wp-content/plugins/woocommerce/assets/images/icons/credit-cards/mastercard.svg" />';
$icons['amex'] = '<img src="http://woocommerce-ext.reh/wp-content/plugins/woocommerce/assets/images/icons/credit-cards/amex.svg" />';
return $icons;
}
@arrowtype
arrowtype / README.md
Last active October 8, 2021 13:15
The basics of working with unicode values in Python

Unicode values in Python

Unicodes can either be integers (“A” is 65, “B” is 66, etc) or hex (“A” is 0x41, “B” is 0x42, etc).

When scripting with RoboFont or FontTools, a hard thing at first is that different styles come up in different contexts. For example, integers will often be used in scripts, but hex values are shown in UIs and in the TTX output of cmap (the table that maps unicode values to glyphs). So, it's helpful to know how to go between them to do different types of work.

To go from a string to an unicode integer, you can use ord(), like:

&gt;&gt;&gt; ord("A")