Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE HTML>
<html>
<head>
<title>
JW Player Reponsive Video
</title>
<script type="text/javascript" src="//cdn.jsdelivr.net/jwplayer/5.10/jwplayer.js">
</script>
<style type="text/css">
html, body {
@grappler
grappler / hide-view.php
Last active February 6, 2023 03:24
Here is how to remove the "view" button from all three locations for a custom post type.
<?php
/**
* Hides the 'view' button in the post edit page
*
*/
function hv_hide_view_button() {
$current_screen = get_current_screen();
@grappler
grappler / migrate-wp-user-avatar.php
Created September 13, 2022 11:34
Allows sites to easily move away from the WP User Avatar plugin and switch to WP User Avatars instead.
<?php
/*
Migrate from WP User Avatar to WP User Avatars
Allows sites to easily move away from the WP User Avatar plugin and switch to WP User Avatars instead.
Run by invoking with WP CLI like so:
`wp eval-file migrate-wp-user-avatar.php`
Author: Ulrich Pogson
<script src="//cdn.jsdelivr.net/jwplayer/6.7/jwplayer.js"></script>
<div id="player_6"></div>
<script>
jwplayer("player_6").setup({
image: "http://testing.grappler.tk/files/2013/01/trailer_1080p.jpg",
file: "http://testing.grappler.tk/files/2013/01/trailer_1080p.mp4",
width: "100%",
aspectratio: "16:9"
});
</script>
@grappler
grappler / Theme-review-links
Last active May 19, 2022 06:08
WordCamp Köln Contributor Day Theme Review Info Links
<?php
/*
Migrate from WP User Avatar to WP User Avatars
Allows sites to easily move away from the WP User Avatar plugin and switch to WP User Avatars instead.
Run by invoking with WP CLI like so:
`wp eval-file migrate-wp-user-avatar.php`
Author: Ulrich Pogson
@grappler
grappler / touchid_sudo.sh
Created February 21, 2021 11:12 — forked from RichardBronosky/touchid_sudo.sh
Use TouchID for sudo on modern MacBook Pro machines
#!/bin/bash
# curl -sL https://gist.githubusercontent.com/RichardBronosky/31660eb4b0f0ba5e673b9bc3c9148a70/raw/touchid_sudo.sh | bash
# This script is ready to copy-paste in whole, or just the line above (without the leading #)
# Use TouchID for sudo on modern MacBook Pro machines
# This script adds a single line to the top of the PAM configuration for sudo
# See: https://apple.stackexchange.com/q/259093/41827 for more info.
touchid_sudo(){
@grappler
grappler / Gruntfile.js
Last active October 5, 2020 03:47
https://webtranslateit.com/en/docs/web_translate_it_client/ / http://docs.transifex.com/developer/client/ Run this command in the folder to install all of the files needed. `npm install --save-dev`
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
makepot: {
target: {
@grappler
grappler / comopser-wp-cli.md
Last active November 22, 2019 08:55 — forked from neverything/comopser-wp-cli.md
Install composer and wp-cli on cyon.ch hostings with SSH access.

Cyon.ch/Hostpoint - Install composer & wp-cli

SSH into your server and stay in the home directory of the user. Check if you have a bin directory in your user directory already, in case you do, omit the mkdir bin.

Use bin folder in $HOME for user scriptsr

For the commands to be loaded from the bin directory run echo "export PATH=$HOME/bin:$PATH" >> ~/.bashrc. For the new config to be used run source ~/.bashrc or close and reopen your SSH session.

Composer

<?php
/**
* Plugin Name.
*
* @package Plugin_Name_Admin
* @author Your Name <email@example.com>
* @license GPL-2.0+
* @link http://example.com
* @copyright 2013 Your Name or Company Name
*/