Skip to content

Instantly share code, notes, and snippets.

@legzo
legzo / log4jAdmin.jsp
Created October 17, 2011 12:19 — forked from anonymous/log4jAdmin.jsp
Change log4j log levels runtime from a 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();%>
export PS1='\n\[\033[0;33m\]\u@\h ${PWD/#HOME/~}$(__git_ps1 " (%s)")\n→ \[\033[0m\]'
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'
@legzo
legzo / default.yml
Created January 23, 2021 20:41
Fichier de conf espanso
# 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: