Skip to content

Instantly share code, notes, and snippets.

@bgauduch
bgauduch / multiple-repository-and-identities-git-configuration.md
Last active April 15, 2024 19:17
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@jaibeee
jaibeee / brew-perms.sh
Last active February 15, 2024 22:49
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@renatorib
renatorib / operator_with_ligatures.md
Last active January 11, 2024 06:45
Using Operator Mono with Fira Code ligatures in Atom.

Using Operator Mono with Fira Code ligatures in Atom.

  1. Open your Atom's Stylesheet
    image

  2. Put this css

atom-text-editor {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
@anikalindtner
anikalindtner / gist:9524950
Last active March 1, 2023 11:52
Workshops/Mailinglists/Lists
@GrayedFox
GrayedFox / arrayRemoveMethod.js
Last active January 9, 2023 11:58
Array.remove safe polyfill
// remove the first instance of an item inside an array (extends native array object)
if (!Array.prototype.remove) {
Array.prototype.remove = function remove (item) { // eslint-disable-line no-extend-native
if (!(this || Array.isArray(this))) {
throw new TypeError()
}
if (this.indexOf(item) !== -1) {
this.splice(this.indexOf(item), 1)
return this
@bastianallgeier
bastianallgeier / kirby2.md
Last active August 17, 2020 08:57
An overview of changes and new features for Kirby 2 – Toolkit, CMS and Panel (work in progress)

I've moved this doc to:

@jorgenpt
jorgenpt / ksdiff-batch.sh
Last active October 9, 2019 18:24
Batches multiple invocations of ksdiff to open in a single Kaleidoscope window if they happen within a few seconds of eachother. This is useful for Kaleidoscope integration with P4V, since it makes a multi-file diff open in a single window. If it doesn't quite pick up all your files, try setting TIMEOUT to more than 4 seconds.
#!/bin/bash
# Number of seconds we wait after a file is received before we consider the
# batch to be completed.
TIMEOUT=2
# Title of the tab in Kaleidoscope
LABEL="P4V ksdiff-batch"
# FIFO we communicate with the "batch master" for.
fifo="/tmp/ksdiff-batch-$USER"
@tysongach
tysongach / kirbytext.extended.php
Created December 19, 2012 17:21
A Kirbytext extension for creating HTML5 figure tags with a thumbnail image, alignment class (e.g. left, right or center for an article), caption and an anchor which links the thumbnail to the full-size version of the image.
<?php
class kirbytextExtended extends kirbytext {
function __construct($text, $markdown=true) {
parent::__construct($text, $markdown);
// define custom tags
$this->addTags('figure');