Skip to content

Instantly share code, notes, and snippets.

@legzo
legzo / default.yml
Created Jan 23, 2021
Fichier de conf espanso
View default.yml
# espanso configuration file
show_icon: false
show_notifications: false
# This is the default configuration file, change it as you like it
# You can refer to the official documentation:
# https://espanso.org/docs/
# Matches are the substitution rules, when you type the "trigger" string
# it gets replaced by the "replace" string.
matches:
View gist:0a69db90918b7d84cdc6f82c4fb90ba2
echo $(($(curl "https://www.strava.com/api/v3/activities?per_page=200&after=1546300800&access_token=xxxx" -s | jq '[.[]|select(.commute == true)|.distance] | add') /1000)) | xargs printf '\n<2705> %5.0f km de velotaff\n'
View gist:074b8a1c036de0af1edd
export PS1='\n\[\033[0;33m\]\u@\h ${PWD/#HOME/~}$(__git_ps1 " (%s)")\n→ \[\033[0m\]'
@legzo
legzo / log4jAdmin.jsp
Created Oct 17, 2011 — forked from anonymous/log4jAdmin.jsp
Change log4j log levels runtime from a jsp
View log4jAdmin.jsp
<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ page import="org.apache.log4j.Level" %>
<%@ page import="org.apache.log4j.LogManager" %>
<%@ page import="org.apache.log4j.Logger" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.Enumeration" %>
<%@ page import="java.util.Set" %>
<%@ page import="java.util.Arrays" %>
<% long beginPageLoadTime = System.currentTimeMillis();%>