Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Working, working, working...

Ben Peachey Potherca

👨‍💻
Working, working, working...
View GitHub Profile
@MadaraUchiha
MadaraUchiha / github-markdown-linkify.user.js
Created Jun 10, 2020
Add mentions to markdown in GitHub
View github-markdown-linkify.user.js
// ==UserScript==
// @name Linkify Markdown Mentions - github.com
// @namespace Violentmonkey Scripts
// @match https://github.com/*
// @grant none
// @version 1.0
// @author Madara Uchiha
// @description 6/10/2020, 4:29:55 PM
// ==/UserScript==
@Potherca
Potherca / pipeline-components-pulls.md
Last active Nov 29, 2020
Amount of pulls from docker hub for each of the gitlab pipeline-components.
View pipeline-components-pulls.md
@mjrider
mjrider / releaser
Created Jan 27, 2019
quick'n'dirty tag next release script
View releaser
#!/bin/bash
# ==============================================================================
# MIT License
#
# Copyright (c) 2019 Robbert Müller
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@marulitua
marulitua / setup.sh
Last active Jul 23, 2020
Instal php5.6 with phpbrew on ubuntu 18.04
View setup.sh
#!/bin/bash
# Instal php5.6 with phpbrew on ubuntu 18.04
# Install all dependencies
sudo apt update
sudo apt install wget php build-essential libxml2-dev libxslt1-dev libbz2-dev libcurl4-openssl-dev libmcrypt-dev libreadline-dev libssl-dev autoconf
wget https://github.com/phpbrew/phpbrew/raw/master/phpbrew
chmod +x phpbrew
mv phpbrew /usr/local/bin
@KavenTheriault
KavenTheriault / clean_code.md
Last active Aug 21, 2018 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin
View clean_code.md

What is Clean Code

  • elegant and efficient
  • does one thing well
  • can easily be read, and enhanced by a developer other than its original author
  • meaningful names
  • minimal dependencies
  • has unit and acceptance tests
  • clean code always looks like it was written by someone who cares
  • nothing obvious that you can do to make it better
  • no duplication
View git-io-custom-url.md

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
@oneilsh
oneilsh / OpenprocessingLinks.md
Last active May 30, 2020
Openprocessing Links
View OpenprocessingLinks.md
@mlinhard
mlinhard / docker_desc.sh
Last active Jun 24, 2020
Shell script to find docker image descendants
View docker_desc.sh
#!/bin/bash
parent_short_id=$1
parent_id=`docker inspect --format '{{.Id}}' $1`
get_kids() {
local parent_id=$1
docker inspect --format='ID {{.Id}} PAR {{.Parent}}' $(docker images -a -q) | grep "PAR ${parent_id}" | sed -E "s/ID ([^ ]*) PAR ([^ ]*)/\1/g"
}
print_kids() {
@hikari-no-yume
hikari-no-yume / example.php
Created Mar 20, 2017
function chaining for PHP 7
View example.php
<?php declare(strict_types=1);
require_once "✨.🐘";
✨($_)->strlen("foo")->var_dump($_);
@mlocati
mlocati / exceptions-tree.php
Created Mar 9, 2017
Throwable and Exceptions tree
View exceptions-tree.php
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
if (count($throwablesPerParent) !== 0) {
die('ERROR!!!');
You can’t perform that action at this time.