Skip to content

Instantly share code, notes, and snippets.

Philippe Miossec pmiossec

  • Altus Group
  • Paris, France
Block or report user

Report or block pmiossec

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
View keybase.md

Keybase proof

I hereby claim:

  • I am pmiossec on github.
  • I am pmiossec (https://keybase.io/pmiossec) on keybase.
  • I have a public key ASClURb8myHnIocARy4K995clSAQCJbaiBDzs34EooFHego

To claim this, I am signing this object:

View Git_advanced
* DAG
* .git Folder architecture & `git cat-file -p`
* git reflog
* Git Workflows
* [Tracking method history](http://urbanautomaton.com/blog/2014/09/22/tracking-method-history-in-git/)
git log -L :MethodName:Path/Toward/File.cs
require `.gitattribue` diff aware config: https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html#_defining_a_custom_hunk_header
* git rerere
@pmiossec
pmiossec / replace_root.sh
Created May 31, 2015
Script to permit to rcheckin a git repository to a newly created TFVC repository with git-tfs
View replace_root.sh
#Script to permit to rcheckin a git repository to a newly created TFVC repository with git-tfs
#adaptation from my answer: http://stackoverflow.com/questions/645450/insert-a-commit-before-the-root-commit-in-git/30558271#30558271
#usage: pass to the script (1) the url of the tfs server, (2) the tfs path in the repository, (3) the changeset id
#../replace_root.sh "https://urlOfYourTfs/DefaultCollection" "$/EmptyTfs/Trunk" 21
tfsServer=$1
tfsPath=$2
tfsChangesetId=$3
gitTfsMetadata="git-tfs-id: [$tfsServer]$tfsPath;C$tfsChangesetId"
@pmiossec
pmiossec / .gitconfig
Last active Dec 26, 2015
tig binding commands
View .gitconfig
[tig "bind"]
# Amend last commit in status view
status = A !?git commit --amend
#Create a branch
main = ^b !?git checkout -b %(prompt)
#Push to Remote repository
main = ^o !git push origin
#Stash modifications
generic = ^s !@git stash save
generic = ^S !@git stash pop
@pmiossec
pmiossec / Tfs2012CorrectAssemblyRegistration.reg
Created May 30, 2013
Reg file to correct assembly registration for Tfs2012. This permit to avoid an error when checkin in TFS using tfs checkin policies outside Visual Studio (git-tfs,... ). PS : Modify file path if your Visual Studio install folder is not the default one ("C:\Program Files (x86)\Microsoft Visual Studio 11.0")
View Tfs2012CorrectAssemblyRegistration.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\TeamFoundation\SourceControl\Checkin Policies]
"Microsoft.TeamFoundation.Build.Controls"="C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\PrivateAssemblies\\Microsoft.TeamFoundation.Build.Controls.dll"
"Microsoft.TeamFoundation.VersionControl.Controls"="C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\PrivateAssemblies\\Microsoft.TeamFoundation.VersionControl.Controls.dll"
@pmiossec
pmiossec / my git aliases
Last active Jul 28, 2018
Git alias to automaticaly stash (if needed) before a git command and unstash afterUsage : git s rebase master
View my git aliases
[alias]
#Autostash before a git command `git s rebase ....`
s = !sh -c \"git stash save | grep 'No local changes to save' && git $* || (git $* && git stash pop) \"
autostash = !sh -c \"git s $*\"
#moving between parent/child when doing a presentation
next = !git checkout -f `git rev-list --ancestry-path @..master | tail -n 1`
prev = !git checkout -f @^
#-------------- display logs-------------
@pmiossec
pmiossec / hardest_sudoku.ss
Created Mar 19, 2013
Hardest sudoku in the world!!!
View hardest_sudoku.ss
*-----------*
|8..|...|...|
|..3|6..|...|
|.7.|.9.|2..|
|---+---+---|
|.5.|..7|...|
|...|.45|7..|
|...|1..|.3.|
|---+---+---|
|..1|...|.68|
@pmiossec
pmiossec / DisplayStringList.cs
Created Jul 2, 2012
Aggregate string to display as a list
View DisplayStringList.cs
var strings = new System.Collections.Generic.List<string> { "item 1", "item 2", "item 3" };
var displayStringList = "list : " + System.Environment.NewLine + "- " + strings.Aggregate((s1, s2) => s1 + System.Environment.NewLine + "- " + s2);
You can’t perform that action at this time.