Skip to content

Instantly share code, notes, and snippets.

View gcollic's full-sized avatar
💭
⌨️

Guillaume Collic gcollic

💭
⌨️
View GitHub Profile
@gcollic
gcollic / bbl_zsh.md
Last active February 28, 2020 14:58
BBL Zsh

BBL Zsh and other command line goodies

Notes on the "how", complementing the demo about the "why".

Make Zsh the default shell

chsh -s $(which zsh)
@gcollic
gcollic / git_for_intellij.sh
Last active February 15, 2023 10:03
Replace the path to git by the path of this file in order to stop IntelliJ from messing with your staging area (no config for rename & co).
#!/bin/bash
inner() {
local cmd="$@"
local REGEX="(^|log.showSignature=false )(add|rm|mv) "
if [[ $cmd =~ $REGEX ]]; then
echo 'Stopping IntelliJ from being a not well-behaved git client. See IDEA-194592, IDEA-63391, IDEA-176961, ...' >&2
return 1
fi
git "$@"
}
@gcollic
gcollic / SerilogLinqpad.cs
Last active May 17, 2018 15:25
Trying Serilog in LinqPad ( gist version of https://twitter.com/adamchester/status/726965534693056513 )
void Main()
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Warning()
.Enrich.FromLogContext()
.Enrich.WithProperty("url", "http://serilog.net/")
.WriteTo.Sink(new LinqpadDumpSink())
.CreateLogger();
Log.Warning(
"Processing inside {@test}, something weird happened",
@gcollic
gcollic / Config.cs
Last active August 29, 2015 14:18
MVC test helpers
using BoDi;
using Meltingood.Web.App_Start;
using Ninject.MockingKernel.NSubstitute;
using TechTalk.SpecFlow;
namespace Tests
{
[Binding]
public class Config
{
@gcollic
gcollic / geshi.less
Created November 18, 2014 11:22
DokuWiki GeSHi styles based on adobe-edge-code
/**
* GeSHi syntax highlighting styles
*
* based on https://studiostyl.es/schemes/adobe-edge-code
*
*/
.code {
.co0 {
color: #666666;
font-style: italic;
@gcollic
gcollic / .gitconfig
Last active February 24, 2020 15:38
Pretty log for comparison between head and origin
[alias]
#lg = log --oneline --decorate --graph
lg = log --graph --format=format:'%C(yellow)%h%C(reset) %C(white)%s%C(reset)%C(auto)%d%C(reset)%C(dim white) %C(reset)%C(dim cyan)%ar%C(reset)%C(dim white) %aN <%aE>%C(reset)'
lga = !git lg --all
lgo = !git lg HEAD origin/master --not `git merge-base HEAD origin/master`^@
lgd = !git lg HEAD origin/develop --not `git merge-base HEAD origin/develop`^@
@gcollic
gcollic / RomanTests.py
Created May 24, 2013 08:31
Tests of the Roman Numerals kata in python (Coding Dojo of Beaulieu 22/05/2013)
import unittest
from kata import roman
l = [
["I", 1],
["II", 2],
["III", 3],
["IV", 4],
["V", 5],
["IX", 9],
@gcollic
gcollic / config
Last active February 24, 2020 15:41
Pretty git log for branches
[alias]
#lg = log --oneline --decorate --graph
lg = log --graph --format=format:'%C(yellow)%h%C(reset) %C(white)%s%C(reset)%C(auto)%d%C(reset)%C(dim white) %C(reset)%C(dim cyan)%ar%C(reset)%C(dim white) %aN <%aE>%C(reset)'