Skip to content

Instantly share code, notes, and snippets.

View anthonycirc's full-sized avatar

Anthony.D anthonycirc

View GitHub Profile
@anthonycirc
anthonycirc / on-modify.00-timewarrior
Last active March 26, 2020 14:06
[Intégration Takswarrior / Timewarrior / Gnome pomodoro] #taskwarrior #timewarrior #gnomepomodoro #conf
#!/usr/bin/env python2
# ~/.task/hooks/on-modify.00-timewarrior
# API is here: https://taskwarrior.org/docs/hooks.html
# To be saved at ~/.task/hooks/on-modify.01-gnome-pomodoro to ensure it is
# run after the timewarrior hook, which should be saved as
# ~/.task/hooks/on-modify.00-timewarrior
# Otherwise, this is run before which then runs the Gnome-Pomodoro actions
# things get quite messy!
import json
import os
@anthonycirc
anthonycirc / .leptonrc
Created March 26, 2020 13:55
[Lepton conf] #lepton #conf ~/snap/lepton/current/.leptonrc
{
"theme": "light",
"snippet": {
"expanded": true,
"newSnippetPrivate": false,
"sorting": "updated_at",
"sortingReverse": true
},
"editor" : {
"tabSize": 4
@anthonycirc
anthonycirc / config.fish
Last active November 10, 2024 04:10
[Fish config] #fish #config ~/.config/fish/config.fish
# Taskwarrior / Timewarrior
alias t=task
alias ts=task summary.weekly
function tn
while true; clear && task due.before:today or due:today or task due.before:5d next limit:5; sleep 2; end
end
function tl
while true; clear && task due.before:today or due:today or task due.before:5d list limit:10; sleep 2; end
@anthonycirc
anthonycirc / M5A97.conf
Last active March 26, 2020 13:53
[Asus M5A97] #conf #asus /etc/sensors.d/M5A97.conf
# Asus M5A97 R2.0
#/etc/sensors.d/M5A97.conf
chip "k10temp-pci-00c3"
label temp1 "CPU Temp (rel)"
chip "it8721-*"
label in0 "+12V"
label in1 "+5V"
@anthonycirc
anthonycirc / page_processor.py
Created April 18, 2016 08:12
Paginate mezzanine TabularInline or StackedInline Model
from mezzanine.pages.page_processors import processor_for
from mezzanine.utils.views import paginate
from mezzanine.conf import settings
from .models import PageCustom
@processor_for(PageCustom)
def article_paginate(request, page):
posts = [posts for posts in page.pagecustom.posts.filter(active=True)]
@anthonycirc
anthonycirc / settings.py
Created April 6, 2016 17:30
Mezzanine field injection
from mezzanine.core.fields import RicheTextField
EXTRA_MODEL_FIELDS = (
(
"mezzanine.pages.models.Page.titleheading",
"RichTextField",
("Titulo del contenido",),
{"blank": True, "max_length": 255, "null": True},
),
)