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
# Goal: substitute each letter in the word "while" with the corresponding alternate. | |
# Option 0 — does not work, error "many-to-many substitution not available" | |
lookup whileAttrCalt-0 useExtension { | |
ignore sub @AllLetters w' h i l e; | |
ignore sub w' h i l e @AllLetters; | |
sub w' h' i' l' e' by w.alt2 h.alt2 i.alt2 l.alt2 e.alt2; | |
} whileAttrCalt-0; |
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 |
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)` |
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']); |
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' ), |
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...'; | |
} |
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 ); | |
} |
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; |