Skip to content

Instantly share code, notes, and snippets.

View klobinoid's full-sized avatar

Petr Klobás klobinoid

  • Brno
View GitHub Profile
@troyfontaine
troyfontaine / 1-setup.md
Last active April 24, 2024 14:19
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@azizur
azizur / Creating a static copy of a dynamic website.md
Last active April 24, 2024 18:06
Creating a static copy of a dynamic website

The command line, in short…

wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/

…and the options explained

  • -k : convert links to relative
  • -K : keep an original versions of files without the conversions made by wget
  • -E : rename html files to .html (if they don’t already have an htm(l) extension)
  • -r : recursive… of course we want to make a recursive copy
  • -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.
@pavelkucera
pavelkucera / Extension.php
Last active December 20, 2015 22:59
How to add a factory taking parameter into Nette DIC. Both ways, using config.neon and compiler extension, have the same result.
<?php
class Extension extends \Nette\DI\CompilerExtension
{
public function loadConfiguration()
{
$container = $this->getContainerBuilder();
$container->addDefinition($this->prefix('formMapperFactory'))
->setImplement('Namespace\IFactory')
@enumag
enumag / bardump.php
Created December 11, 2012 22:28
Nette\Diagnostics\Debugger::barDump shortcut
<?php
use \Nette\Diagnostics\Debugger;
/**
* Nette\Diagnostics\Debugger::barDump shortcut.
* @author Jáchym Toušek
* @param mixed $value
*/
function bd($value)