This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import enum | |
| class ChoiceEnum(enum.Enum): | |
| @staticmethod | |
| def tr(func): | |
| label_for = classmethod(lambda cls, member: _(func(member.name))) | |
| return type('ChoiceEnumTr', (), {'label_for': label_for}) | |
| @classmethod | |
| def label_for(cls, member): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| identifiers: | |
| - wheel-speed-a: | |
| offset: 0x0b0 | |
| - wheel-speed-b: | |
| offset: 0x0b2 | |
| frames: | |
| - wheel-speed: | |
| a: luint16 | |
| b: luint16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| out_to_x no | |
| own_window no | |
| out_to_console yes | |
| background no | |
| max_text_width 0 | |
| # Update interval in seconds | |
| update_interval 2.0 | |
| # This is the number of times Conky will update before quitting. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def tree(root): | |
| """ | |
| Node(label = "string", children = [list of Node]) | |
| """ | |
| ret = [root.label] | |
| ln = len(root.children) | |
| for i, child in enumerate(root.children): | |
| for j, s in enumerate(tree(child)): | |
| char = '│ ' | |
| if i == ln - 1: # last child |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- a/PKGBUILD 2013-06-01 18:03:30.000000000 +0200 | |
| +++ b/PKGBUILD 2015-06-20 18:57:39.046300329 +0200 | |
| @@ -2,7 +2,7 @@ | |
| pkgname=lua-cjson | |
| pkgver=2.1.0 | |
| -pkgrel=2 | |
| +pkgrel=3 | |
| pkgdesc="A fast JSON parsing and encoding support for Lua." | |
| arch=(i686 x86_64) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # random wallpaper | |
| set $random-wall-cmd /bin/sh $HOME/.config/i3/wallpaper.sh | |
| exec --no-startup-id $random-wall-cmd | |
| bindsym $mod+b exec --no-startup-id $random-wall-cmd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import asyncio | |
| import binascii | |
| import irc3 | |
| import re | |
| import requests | |
| import subprocess | |
| import time | |
| VOICES = ["Helene", "Emma", "Electra", "DarkVadoor", "Damien", "Agnes", "Bicool", "Chut", "Melodine", "Ludovic", "Fabienne", "Eva", "Loic", "JeanJean", "John", "Matteo", "Michel", "Papi", "Philippe", "Ramboo", "Robot", "Sidoo", "Sorciere", "Yeti", "Zozo"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once 'eirb-common/CAS/CAS.php'; | |
| function eirb_cas_protect() { | |
| phpCAS::client(CAS_VERSION_2_0, 'cas.enseirb-matmeca.fr', 443, 'cas'); | |
| phpCAS::setNoCasServerValidation(); | |
| phpCAS::forceAuthentication(); | |
| return phpCAS::getUser(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python wordreferencespeak.py \ | |
| never gonna give you up \ | |
| never gonna let you down \ | |
| never gonna run around and desert you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| main=LVDS1 | |
| a=VGA1 | |
| b=HDMI1 | |
| dir=left | |
| function on { | |
| echo Switching $1 on | |
| xrandr --output $1 --auto --$dir-of $main |