View Unicode Private Use Area codes for Glyphs
This file contains 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
uniE000 | |
uniE001 | |
uniE002 | |
uniE003 | |
uniE004 | |
uniE005 | |
uniE006 | |
uniE007 | |
uniE008 | |
uniE009 |
View cellWithMasking.jsx
This file contains 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 React from 'react'; | |
import store from '../models/CanvasStore'; | |
import {observer} from 'mobx-react' | |
const Cell = observer((props) => { | |
const [glyphPath, svgWidth, svgHeight, svgBaseline, glyphOffsetX, glyphFontSizeModifier, rotationAmount, flipGlyph, glyphInvertedColor] | |
= store.canvas[props.y][props.x] | |
let transform = { | |
transform: `scale(${flipGlyph}, -1) rotate(${rotationAmount}deg)` |
View gist:5624060
This file contains 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
// **************************************************** | |
// Hide contact fields from profile in admin interface | |
// **************************************************** | |
add_filter( 'user_contactmethods', 'update_contact_methods',10,1); | |
function update_contact_methods( $contactmethods ) { | |
unset($contactmethods['aim']); | |
unset($contactmethods['jabber']); | |
unset($contactmethods['yim']); |
View gist:5624056
This file contains 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
// **************************************************** | |
// Make a custom post type | |
// **************************************************** | |
function projektiRegister() | |
{ | |
$labels = array( | |
'name' => _x('Lisää projekti', 'post type general name'), | |
'singular_name' => _x('Lisää projekti', 'post type singular name'), | |
'add_new' => _x('Lisää uusi projekti', 'portfolio item'), | |
'all_items' => __( 'Kaikki projektit' ), |
View gist:5624052
This file contains 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
// **************************************************** | |
// Change title's placeholder text for custom post type "projekti" | |
// **************************************************** | |
function change_default_title_event( $title ){ | |
$screen = get_current_screen(); | |
if ( 'projekti' == $screen->post_type ) { | |
$title = 'Projektin otsikko...'; | |
} |
View gist:5624043
This file contains 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
// **************************************************** | |
// Add custom dashboard menu page for editing a page | |
// **************************************************** | |
add_action( 'admin_menu', 'register_my_custom_menu_page' ); | |
function register_my_custom_menu_page(){ | |
add_menu_page( 'Me ja In English osiot', 'Muokkaa Me ja In English osioita', 'edit_pages', 'post.php?post=13&action=edit', '', '', 15 ); | |
} |
View 100browserheight.js
This file contains 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
$(document).ready(function() { | |
// for a div to be 100% - 100px of browser window height | |
var windowheight = $(window).height(); | |
var newheight = windowheight - 100; | |
$("#landing-section").height(newheight); | |
}); | |
// with window resize | |
$(window).resize(function() { | |
var windowheight = $(window).height(); | |
var newheight = windowheight - 100; |