Skip to content

Instantly share code, notes, and snippets.

View JakubBlaha's full-sized avatar
😛
I like the fact that private repos are free now!

Jakub Bláha JakubBlaha

😛
I like the fact that private repos are free now!
  • IDS
  • Brno, Czech Republic
View GitHub Profile
@gongzhitaao
gongzhitaao / py-logger-template.py
Last active May 1, 2024 18:08
Python logging template
import logging
import logging.config
from datetime import datetime
import os
import sys
LOGFILE = '/tmp/{0}.{1}.log'.format(
os.path.basename(__file__),
datetime.now().strftime('%Y%m%dT%H%M%S'))
@Nt-gm79sp
Nt-gm79sp / powercfg-win10-more-settings.cmd
Last active January 7, 2024 16:15 — forked from theultramage/powercfg-win7-all-settings.bat
Show/hide hidden settings in Win10 Power Options
@echo on
REM checked for Windows 10
REM fork from https://gist.github.com/theultramage/cbdfdbb733d4a5b7d2669a6255b4b94b
REM you may want full list https://gist.github.com/raspi/203aef3694e34fefebf772c78c37ec2c
REM SET attrib=+ATTRIB_HIDE
SET attrib=-ATTRIB_HIDE
REM Hard disk burst ignore time
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 80e3c60e-bb94-4ad8-bbe0-0d3195efc663 %attrib%
@tsuriga
tsuriga / config.ini
Created March 20, 2016 13:48
Simple config file validation in python
[DEFAULT]
; Operation mode
; This is a global value for all sections
mode = master
[server]
; Connection lifetime
timeout = 3600
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active May 4, 2024 04:45
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
"""Hoverable Behaviour (changing when the mouse is on the widget by O. Poyen.
License: LGPL
"""
__author__ = 'Olivier POYEN'
from kivy.properties import BooleanProperty, ObjectProperty
from kivy.core.window import Window
class HoverBehavior(object):