Skip to content

Instantly share code, notes, and snippets.

View hirasso's full-sized avatar
👋

Rasso Hilber hirasso

👋
View GitHub Profile
@steven2358
steven2358 / ffmpeg.md
Last active October 18, 2025 13:57
FFmpeg cheat sheet
@Ciantic
Ciantic / Indexer.php
Last active August 31, 2018 15:44
Fixing a PHP Language Server for my own taste
<?php
/**
* Will read and parse the passed source files in the project and add them to the appropiate indexes
*
* @return Promise <void>
*/
public function index(): Promise
{
return coroutine(function () {
@amboutwe
amboutwe / yoast_seo_disable_single_post.php
Last active May 25, 2021 22:39
Remove Yoast from front end for a single post or page
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Remove Yoast from front end for a single post or page
* Credit: Dodinas https://stackoverflow.com/questions/37845968/disable-wordpress-yoast-seo-on-single-page
* Last Tested: Nov 08 2019 using Yoast SEO 12.4 on WordPress 5.2.4
* Note: For version 14+, please use the code here: https://developer.yoast.com/customization/yoast-seo/disabling-yoast-seo
*********
* DIFFERENT POST TYPES
* Post: Change 123456 to the post ID
* Page: Change is_single to is_page and 123456 to the page ID
@fnky
fnky / ANSI.md
Last active October 18, 2025 10:22
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@Aidurber
Aidurber / cleanup.sh
Last active September 29, 2022 13:14
A handy script to clean up a mac thanks to - Gant Laborde's article: https://medium.freecodecamp.org/how-to-free-up-space-on-your-developer-mac-f542f66ddfb
# Cleanup old node_modules
echo "Cleaning node_modules in projects older than 30 days"
find . -name "node_modules" -type d -mtime +30 | xargs rm -rf
echo "Done cleaning node_modules"
# Clean up homebrew
echo "Clean homebrew"
brew update && brew upgrade && brew cleanup
echo "Done cleaning homebrew"
@polevaultweb
polevaultweb / prefix-composer-autoloader-namespace.php
Last active October 31, 2024 19:10
Patch file to run after PHP Scoper to ensure the Composer Autoload namespace is prefixed
<?php
/**
* Make sure the Composer\Autoload namespace is prefixed.
* Needs to be run after php-scoper.
*
* `php ./patch-scoper-autoloader-namespace.php MY_PREFIX`
*/
if ( empty( $argv[1] ) ) {
return;
@joshkautz
joshkautz / Replace TextEdit as the default macOS text editor.md
Last active January 6, 2025 02:09
Replace TextEdit as the default text editor

Replace TextEdit as the default text editor application for opening plain text files and files with no extensions on macOS.

Run the following command in the Terminal to find the bundle identifier for your desired text editor application:

$ osascript -e 'id of app "Visual Studio Code"'
com.microsoft.VSCode

$ osascript -e 'id of app "Sublime Text"'
com.sublimetext.3
@afragen
afragen / change-default-content-folder.php
Last active October 25, 2021 20:27
Use the 'gu_fix_repo_slug' filter to change the default wp-content folder name.
<?php
/**
* Usage of 'gu_fix_repo_slug' filter.
*
* @package wordpress-plugin
* @link https://github.com/afragen/git-updater/issues/971
*/
/**
* Plugin Name: Change Default Content Folder
// Core assets
let coreAssets = [];
// On install, cache core assets
self.addEventListener('install', function (event) {
// Cache core assets
event.waitUntil(caches.open('app').then(function (cache) {
for (let asset of coreAssets) {
cache.add(new Request(asset));