Skip to content

Instantly share code, notes, and snippets.

View islandjoe's full-sized avatar

Arthur Kho islandjoe

  • Helsinki, Finland
View GitHub Profile
@islandjoe
islandjoe / copyright-snippet.php
Created October 16, 2016 17:06
WordPress copyright info footer snippet
@islandjoe
islandjoe / hide-editor-on-specific-admin-page.php
Last active October 16, 2016 21:11
WordPress hide editor on specific admin page
<?
add_action( 'admin_head', function() {
global $pagenow;
if ( !('post.php' == $pagenow) ) return;
global $post;
// Get the Post ID.
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;
@islandjoe
islandjoe / widget-template.php
Created October 16, 2016 21:40
WordPress widget template
<? class MyWidget extends WP_Widget {
/** Widget setup **/
function MyWidget() {
parent::WP_Widget(false,
__( 'My Widget', 'mytextdomain' ),
['description' => __( 'Displays a list of stuff', 'mytextdomain' )],
['width' => '400px']
);
}
@islandjoe
islandjoe / widget-template.php
Created October 16, 2016 21:40
WordPress widget template
<? class MyWidget extends WP_Widget {
/** Widget setup **/
function MyWidget() {
parent::WP_Widget(false,
__( 'My Widget', 'mytextdomain' ),
['description' => __( 'Displays a list of stuff', 'mytextdomain' )],
['width' => '400px']
);
}
@islandjoe
islandjoe / rm-dsstore-from-repo.sh
Last active October 17, 2016 09:41
Remove '.DS_Store' files from git repository
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
git add .gitignore
git commit -m 'Removed all .DS_Store'
@islandjoe
islandjoe / template.html
Last active November 3, 2016 17:53
HTML5 basic template
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>New Webpage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
<link rel="stylesheet" href=""/>
</head>
@islandjoe
islandjoe / redundant-english-words.md
Created December 9, 2016 21:38
Common redundant English words or phrases.
  • absolutely essential
  • absolutely necessary
  • actual facts
  • advance forward
  • advance planning
  • advance preview
  • advance reservations
  • advance warning
  • add an additional
  • add up
@islandjoe
islandjoe / weak-words-or-phrases.md
Last active December 11, 2016 19:50
Words or phrases that will make your writing weak.
  • accordingly -> so
  • accuracy -> accurate
  • admit to
  • all of
  • all things being equal
  • as a matter of fact
  • appearance -> appeared
  • are after -> seek, desire, want
  • as being
  • as far as I’m concerned
@islandjoe
islandjoe / vimrc
Last active December 15, 2016 21:20
My .vimrc starter
syntax on
set tabstop=2
set shiftwidth=2
" Incremental Search
set incsearch
" Search Highlighting
set hlsearch
" Mapping
@islandjoe
islandjoe / index.html
Last active September 16, 2017 09:39
Template: HTML5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Untitled</title>
</head>
<body>
</body>
</html>