Skip to content

Instantly share code, notes, and snippets.

Ben Peachey Potherca

Block or report user

Report or block Potherca

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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 Aug 28, 2019
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
@ZoidQC
ZoidQC / 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
@mlinhard
mlinhard / docker_desc.sh
Last active Sep 16, 2019
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!!!');
View Effective_Engineer.md

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@P7h
P7h / Bash_command_line_shortcuts.md
Created Sep 13, 2016
Bash command line Shortcuts
View Bash_command_line_shortcuts.md

Bash command line Shortcuts

Picked these from here

Command Editing Shortcuts

Command Note
Ctrl + a go to the start of the command line
Ctrl + e go to the end of the command line
Ctrl + k delete from cursor to the end of the command line
@lokothodida
lokothodida / README.md
Last active Dec 14, 2018
Small bookmarklet to help change app drawer icons for Chrome OS web apps
View README.md
  • Create a bookmark with the following text in the URL field:
javascript:(function() {
  var links = document.querySelectorAll('link[rel*=icon]');
  var href  = prompt('Enter your new shelf icon\'s URL');
  href && links.forEach((link) => link.href = href);
})();
You can’t perform that action at this time.