This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TextViewAnimator animator = new TextViewAnimator(); | |
animator.flip(myTextView, label); | |
// animator.fade(myTextView, label); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Gradle tasks & scripts I need everywhere. | |
- ci_job | |
- GCM with flavor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All my CSGO config files. | |
- aim_map | |
- autoexec | |
- nades | |
- training |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Live Templates for AndroidStudio | |
- test - Create a new test | |
# Copyright (C) 2015 Olivier Perez <[email protected]> | |
# 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# git-last - Return the last changes (last commit, staged changes, current changes) | |
# Copyright (C) 2015 Olivier Perez <[email protected]> | |
# 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, |
NewerOlder