Skip to content

Instantly share code, notes, and snippets.

View RandyBooth's full-sized avatar
🏠
Working from home

Randy Booth RandyBooth

🏠
Working from home
View GitHub Profile
@glueckpress
glueckpress / paginate-parent-children.php
Last active September 3, 2021 19:42
[WordPress] Pagination for a parent page and their child pages.
<?php
/**
* Pagination for a parent page and their child pages.
* Use as gp130428_link_pages() in your template file.
* Optionally limit to a particular parent page by passing its ID (i.e. 123) to the function: gp130428_link_pages( 123 )
*
*/
function gp130428_paginate_parent_children( $parent = null ) {
global $post;
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 2, 2025 22:26
A badass list of frontend development resources I collected over time.
@noodlehaus
noodlehaus / web_app.php
Last active December 15, 2017 06:39
bare bones routing function for PHP.
<?php
// minimal routing
function web_app($routes, $req_verb, $req_path) {
$req_verb = strtoupper($req_verb);
$req_path = trim(parse_url($req_path, PHP_URL_PATH), '/');
$found = false;
if (isset($routes[$req_verb])) {
@alexchung
alexchung / Blockout.php
Created February 9, 2014 23:10
Blockout encryption/decryption methods in PHP
<?php
class Blockout {
public static function enblockout($s, $key) {
// user provided blockout encoder
return;
}
public static function deblockout($blockout, $key) {
@addyosmani
addyosmani / README.md
Last active July 2, 2025 14:29 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@mariozig
mariozig / migrate_repo.sh
Last active September 16, 2024 18:48
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror [email protected]:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
@paulirish
paulirish / bling.js
Last active May 26, 2025 20:31
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
@AlexanderPoellmann
AlexanderPoellmann / laravel-5-tweak-login-authcontroller.php
Created May 24, 2015 20:15
Log in with Username or Email in Laravel 5 - AuthController->postLogin()
<?php
/**
* This snippet goes into your
* \app\Http\Controllers\Auth\AuthController.php
*
* Make sure to update your login view as well
* (\resources\views\auth\login.blade.php). Just
* change
*/
@nilportugues
nilportugues / react-lumen.php
Last active December 8, 2018 18:33
React+Lumen
<?php
// bootstrap/react.php
// Remember, we need to do first: composer require react/react!
$app = include('app.php');
$host = 'localhost';
$port = 9000;
$reactApp = function (\React\Http\Request $request, \React\Http\Response $response) use ($app, $host, $port) {

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by