Skip to content

Instantly share code, notes, and snippets.

View fanf's full-sized avatar

François Armand fanf

View GitHub Profile
cat active_branches.sh
#!/bin/zsh
BRANCHES="branches/rudder/2.10 branches/rudder/2.11 branches/rudder/3.0 branches/rudder/3.1 master"
== [fanf@luhman16] ~/java/workspaces/rudder-project (master) ==
% cat update-all-all.zsh
#!/bin/zsh
@fanf
fanf / Rudder_API_with_jq.md
Last active August 29, 2015 14:17
Getting list of directive id/technique name, version/name in Rudder API with jq

jq (http://stedolan.github.io/jq/ ) is a fabulous command line tools to post process JSON API response.

Here how you can easely get the list of Rudder API Directive (http://www.rudder-project.org/rudder-api-doc/#api-Directives-listDirectives), whith their id, name, parent Technique and Version:

% curl -k -H "X-API-Token: D6NckZMXawkQAsWTqUJHjsfUnVCY15da" -X GET https://192.168.41.2/rudder/api/latest/directives \
| jq '.data.directives[] | "\(.id) \(.techniqueName)[\(.techniqueVersion)] \(.displayName)"'

returns:

@fanf
fanf / How-to_multiple_firefox_versions.txt
Last active August 29, 2015 14:14
Install multiple version of Firefox, each with it's own local profil
Start firefox with an other Profile:
-----------------------------------
That will still change things on you user directory (~/.mozilla/firefox/ProfileName)
% ./firefox --no-remote -P ProfileName
Start firefox bypassing the profil manager:
-------------------------------------------
@fanf
fanf / keybase.md
Created January 26, 2015 15:03
keybase.md

Keybase proof

I hereby claim:

  • I am fanf on github.
  • I am fanf42 (https://keybase.io/fanf42) on keybase.
  • I have a public key whose fingerprint is 2D8E 8097 A43E D2FD D838 C694 3951 E376 7779 3E7F To claim this, I am signing this object:
{
    "body": {
        "client": {
@fanf
fanf / eclipse.ini
Created October 13, 2014 16:57
Eclipse 4.3 config for Scala so that it's not toooooo long
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140116-2212
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
@fanf
fanf / .imapfilterSLASHconfig.lua
Created August 28, 2014 14:44
imapfilter config for server with IDLE support
if_dir = os.getenv('HOME') .. '/.imapfilter/'
---------------
-- Options --
---------------
-- time in second before deciding the server timeouted
options.timeout = 120
-- auto-subscribe to new directories
options.subscribe = true
@fanf
fanf / .vimrc_gpg_handling
Last active October 16, 2023 20:37
vimrc config to auto decrypt/encrypt .gpg files
" GPG config
" Don't save backups of *.gpg files
set backupskip+=*.gpg
" To avoid that parts of the file is saved to .viminfo when yanking or
" deleting, empty the 'viminfo' option.
set viminfo=
augroup encrypted
au!
" Disable swap files, and set binary file format before reading the file
@fanf
fanf / DependencyInjection.scala
Created July 18, 2013 16:06
Simple, Static Scala dependency injection with Shapeless
package test_shapeless
object DI {
import shapeless._
trait Injecter[L <: HList, A] {
def apply(l: L) : A
}
trait InjecterAux[L <: HList, A] {
7777950 137 $anon$1 com.normation.ldap.ldif.Slf4jLDIFLogger$class.fileName source-/home/fanf/java/workspaces/rudder-project/scala-ldap/src/main/scala/com/normation/ldap/ldif/LDIFFileLogger.scala,line-114,offset=3359
7778548 932 ClassfileLoader java.util.Comparator NoPosition
7792344 824 ClassfileLoader scala.collection.parallel.mutable.package NoPosition
7793190 8 LazyTypeRef scala.collection.parallel.mutable.package NoPosition
7793210 34 LazyTypeRef scala.collection.parallel.mutable.package NoPosition
7791429 1878 PackageLoader scala.collection.parallel.mutable NoPosition
7791321 2027 LazyTypeRef scala.collection.mutable.ArrayOps NoPosition
This file has been truncated, but you can view the full file.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building scala-ldap 2.6.0-scala_2.10-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ scala-ldap ---
[INFO] Deleting /home/fanf/java/workspaces/rudder-project/scala-ldap/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ scala-ldap ---