Skip to content

Instantly share code, notes, and snippets.

@olivierperez
olivierperez / CSGO.cfg
Last active December 9, 2017 12:17
CSGO config
All my CSGO config files.
- aim_map
- autoexec
- nades
- training
@olivierperez
olivierperez / Gradle tasks & scripts
Last active August 10, 2016 10:01
Gradle tasks & scripts
The Gradle tasks & scripts I need everywhere.
- ci_job
- GCM with flavor
TextViewAnimator animator = new TextViewAnimator();
animator.flip(myTextView, label);
// animator.fade(myTextView, label);
Useful tricks for Android gradle files
- build time
- ci_job
- dependencies
- force a lang for a specific flavor
- gcm flavorish google-services.json
- git commit count
- git sha
- isIdeBuild
#!/bin/bash
GREEN='\033[0;32m'
BROWN='\033[0;33m'
DARK_GRAY='\033[1;30m'
NC='\033[0m' # No Color
IFS=$'\n'
for folder in `find . -maxdepth 1 -type d ! -name .idea* ! -name gitall ! -path . | sort`
do
@olivierperez
olivierperez / CallStack.kt
Created January 9, 2020 14:26
Debug - CallStack
fun buildCallStack(): String {
return Exception().stackTrace
.asSequence()
.filter {
!it.className.startsWith("fr.o80.corelib") &&
!it.className.startsWith("io.reactivex") &&
"rxext" !in it.fileName.toLowerCase(Locale.FRENCH)&&
"MyDebuggerClass" !in it.className
}
.take(4)
@olivierperez
olivierperez / combinations.js
Last active March 28, 2020 12:25
JS Combinations
const computeCombinations = (items) => {
let doIt = (rest, start, output) => {
if (rest.length == 0) {
output.push(start)
return
}
for (let i=0; i < rest.length; i++) {
let begin = rest.slice(0, i)
let end = rest.slice(i+1)