Skip to content

Instantly share code, notes, and snippets.

View robr3rd's full-sized avatar

Robert Robinson robr3rd

  • Knoxville, TN
  • 15:38 (UTC -04:00)
View GitHub Profile
@sirbrillig
sirbrillig / phpcs.xml
Last active May 19, 2021 14:17 — forked from Ovsyanka/ruleset.xml
PHPCS rules for PSR2 with tabs, same-line braces, and missing variable detection
<?xml version="1.0"?>
<ruleset name="PaytonsStandard">
<description>
Originally from https://gist.github.com/Ovsyanka/e2ab2ff76e7c0d7e75a1e4213a03ff95
PSR2 with changes:
- tabs instead of spaces (https://gist.github.com/gsherwood/9d22f634c57f990a7c64)
- bracers on end of line instead new line
- unused/undefined variable detection (https://github.com/sirbrillig/phpcs-variable-analysis)
</description>
<arg name="tab-width" value="4"/>
@ColinLeverger
ColinLeverger / update-images.sh
Created December 8, 2016 11:36
Update all Docker images
docker images | grep -v REPOSITORY | awk '{print $1}' | xargs -L1 docker pull
@LeCoupa
LeCoupa / redis_cheatsheet.bash
Last active June 10, 2024 08:14
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@scottsb
scottsb / sugit
Last active February 2, 2016 16:26
Run Git as Repo Owner
#!/bin/sh
# Execute git commands passed on command line as whatever user owns the current Git repository.
# Script can be substituted 1:1 for git in commands.
# Available under the MIT license.
sudo -u $(stat -c %U $(git rev-parse --git-dir)) git "$@"
// Solves the intersection for a single component
// Reference: http://stackoverflow.com/questions/2821506/how-do-you-tell-if-two-wildcards-overlap
function innersect(w1, w2) {
// both are either empty or contain a wildcard
if ((w1 === "" || w1 === "*") &&
(w2 === "" || w2 === "*")) return true;
// only one of them is empty, the other is not just a wildcard
if (w1 === "" || w2 === "") return false;
var c1 = w1[0], c2 = w2[0];
var remain1 = w1.slice(1), remain2 = w2.slice(1);
@maxtruxa
maxtruxa / Antonyms.md
Last active June 18, 2024 18:39
A list of common terms used in programming and their respective antonyms.

Antonym List

Note: The table headings (positive/negative) are not necessarily meaningful.

Positive Negative
acquire release
add remove (e.g. an item), subtract (arithmetic)
advance retreat
allocate deallocate (correct), free (common)
allow deny
@gruber
gruber / Liberal Regex Pattern for Web URLs
Last active April 22, 2024 19:02
Liberal, Accurate Regex Pattern for Matching Web URLs
The regex patterns in this gist are intended only to match web URLs -- http,
https, and naked domains like "example.com". For a pattern that attempts to
match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502
# Single-line version:
(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|s
@mnapoli
mnapoli / behat-reference.feature
Last active February 12, 2024 10:54
Behat Mink reference
# Given
Given I am on [the] homepage
Given I am on "url"
# When
When I go to [the] homepage
When I go to "url"
When I reload the page
@awidegreen
awidegreen / vim_cheatsheet.md
Last active June 17, 2024 03:41
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close