Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am olivierperez on github.
  • I am olivierperez (https://keybase.io/olivierperez) on keybase.
  • I have a public key whose fingerprint is 7636 0945 8C4A F3E9 EE37 E8C0 5037 B06A C87

To claim this, I am signing this object:

@olivierperez
olivierperez / .vimrc
Last active August 29, 2015 14:02
.vimrc
syn on
syntax enable
colorscheme desert
set background=dark
filetype on
" Display line numbers
" set nu
@olivierperez
olivierperez / .gitconfig
Last active February 2, 2017 13:06
.gitconfig
[user]
name = Olivier PEREZ
email = olivier@olivierperez.fr
signingkey = PUT_YOUR_GPG_KEY_HERE
[core]
editor = vim
autocrlf = true
[branch]
@olivierperez
olivierperez / .bash_ps1
Last active March 19, 2017 19:24
.bash_ps1
# Customize BASH PS1 prompt to show current GIT repository and branch.
# Inspired by Mike Stewart - http://MediaDoneRight.com
# Reset
Color_Off="\[\033[0m\]" # Text Reset
# Regular Colors
Black="\[\033[0;30m\]" # Black
Red="\[\033[0;31m\]" # Red
Green="\[\033[0;32m\]" # Green
# $Id: screenrc,v 1.15 2003/10/08 11:39:03 zal Exp $
#
# /etc/screenrc
#
# This is the system wide screenrc.
#
# You can use this file to change the default behavior of screen system wide
# or copy it to ~/.screenrc and use it as a starting point for your own
# settings.
#
@echo off
set INKSCAPE_EXE="C:\Inkscape\inkscape.exe"
IF NOT EXIST %INKSCAPE_EXE% (
echo Le fichier %INKSCAPE_EXE% n'existe pas
pause
exit
)
private void debug(int level, ViewGroup view) {
for (int childIndex = 0; childIndex < view.getChildCount(); childIndex++) {
View child = view.getChildAt(childIndex);
String tab = "";
for (int x = 0; x < level; x++) {
tab += " ";
}
Log.d("XXXXXXXXXXX", tab + child.getClass() + " | " + child.getId());
if (child instanceof ViewGroup) {
debug(level + 1, (ViewGroup) child);
@olivierperez
olivierperez / git-last
Last active December 18, 2015 14:33
Git - Script that return the last changes
#!/bin/bash
# git-last - Return the last changes (last commit, staged changes, current changes)
# Copyright (C) 2015 Olivier Perez <olivier@olivierperez.fr>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
@olivierperez
olivierperez / drawable-debug_outline.xml
Last active February 22, 2016 15:49
Android - Draw outline of views on old Android, when the developer tools don't display outline of views.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<stroke
android:width="2dp"
android:color="@android:color/holo_blue_dark"/>
</shape>
</item>
Live Templates for AndroidStudio
- test - Create a new test
# Copyright (C) 2015 Olivier Perez <olivier@olivierperez.fr>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.