Skip to content

Instantly share code, notes, and snippets.

View beley's full-sized avatar

Brandon Eley beley

View GitHub Profile
@ray1980
ray1980 / custom_walker.php
Created April 27, 2021 13:51 — forked from cleverinx/custom_walker.php
Custom Wordpress Sub-Menu Walker
class custom_sub_walker extends Walker_Nav_Menu {
public function start_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat( "\t", $depth );
$output .= "\n$indent<ul role=\"menu\" class=\" dropdown-menu\">\n";
}
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
@wynand1004
wynand1004 / 2048_alpha.py
Created December 11, 2018 22:55
An simple Python implementation of the game 2048 written in Python 3.
# 2048 in Python 3 for Beginners (Alpha Version)
# By @TokyoEdTech
import turtle
import random
# Set up the screen
wn = turtle.Screen()
wn.title("2048 by @TokyoEdTech")
wn.bgcolor("black")
@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active January 30, 2026 17:29
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

@chrisyour
chrisyour / Folder Preferences
Created December 4, 2010 20:05
Show hidden files and hidden folders (except .git) in your TextMate project drawer
# Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences.
# Instructions:
# Go to TextMate > Preferences...
# Click Advanced
# Select Folder References
# Replace the following:
# File Pattern