Skip to content

Instantly share code, notes, and snippets.

View JoeSz's full-sized avatar

Joe JoeSz

View GitHub Profile
@CodeMyUI
CodeMyUI / highlight-keywords-of-text-on-hover.markdown
Created January 12, 2018 05:48
Highlight keywords of text on hover

Highlight keywords of text on hover

Just a little experiment. When hovering over the article with your mouse, some keywords from the text should be easy readable while the rest should be darker.

A Pen by Bas Groothedde on CodePen.

License.

@CodeMyUI
CodeMyUI / index.html
Created November 20, 2017 01:23
Material Design - Transformation
<div class="wrapper">
<div class="content">
<div class="img"></div>
<div class="text">
<div class="line title"></div>
<div class="line subtitle"></div>
</div>
</div>
</div>
@alexwcoleman
alexwcoleman / functions.php
Created September 9, 2017 18:07
WordPress: Redirect single custom post type to archive page.
// redirect single posts to the archive page, scrolled to the current member.
// * this is for a post type of "board_member"
add_action( 'template_redirect', function() {
if ( is_singular('board_member') ) {
// I used the two variables to put the member's name as the ID of the article
// so the redirect would automatically scroll. This can be removed.
$title = get_the_title();
$url_append = str_replace( ' ', '-', strtolower($title) );
global $post;
$redirectLink = get_post_type_archive_link( 'board_member' ) . "#" . $url_append;
@Brainiarc7
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Last active March 26, 2024 18:18
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

\index.php
\wp-blog-header.php
\wp-load.php
\wp-config.php
\wp-settings.php
\wp-includes\load.php
\wp-includes\default-constants.php
\wp-includes\version.php
\wp-includes\compat.php
\wp-includes\random_compat\random.php
@robwent
robwent / clean_wordpress_head.php
Last active October 21, 2022 02:38
A collection of snippets for a Wordpress theme's function.php file to clean up the output
<?php
/**
* Core output
**/
//Remove the generator tag
remove_action('wp_head', 'wp_generator');
//Remove the frontend admin bar while in development
@killersean
killersean / fixed-header.js
Created July 13, 2015 14:42
Sticky header using throttle and debounce
(function($) {
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
if (!immediate) func.apply(context, args);
};
@sgnl
sgnl / add-upstream.md
Last active October 3, 2023 22:51
So you've forked a Repository and you want updates...

#tl;dr

setting up a branch to track a repo

pre: assuming you have forked a repo and cloned your fork to your computer

  1. git remote add [maintainer's name] [paste URL here]
  2. git fetch --all
  3. git branch --track [maintainer's name]_[branch] [remote name from step 1]/[branch you want to track] At this point you may watch to checkout to your newly create branch and issue a git pull command.