Skip to content

Instantly share code, notes, and snippets.

View adoussot's full-sized avatar

alexis doussot adoussot

View GitHub Profile
@adoussot
adoussot / echo mem > sys-power-state
Created February 17, 2017 22:02
antergos-xfce-sleep-problem
-- Logs begin at Wed 2016-11-30 11:09:16 CET, end at Thu 2017-02-16 23:36:42 CET. --
Feb 16 23:36:05 aldo-X200MA sudo[738]: aldo : TTY=pts/1 ; PWD=/home/aldo/Documents/workspaces ; USER=root ; COMMAND=/usr/bin/bash -c echo mem > /sys/power/state
Feb 16 23:36:05 aldo-X200MA sudo[738]: pam_unix(sudo:session): session opened for user root by (uid=0)
Feb 16 23:36:10 aldo-X200MA kernel: PM: Syncing filesystems ... done.
Feb 16 23:36:10 aldo-X200MA kernel: PM: Preparing system for sleep (mem)
Feb 16 23:36:10 aldo-X200MA kernel: Freezing user space processes ... (elapsed 0.004 seconds) done.
Feb 16 23:36:10 aldo-X200MA kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Feb 16 23:36:10 aldo-X200MA kernel: PM: Suspending system (mem)
Feb 16 23:36:10 aldo-X200MA kernel: Suspending console(s) (use no_console_suspend to debug)
Feb 16 23:36:10 aldo-X200MA kernel: queueing ieee80211 work while going to suspend
@adoussot
adoussot / .bashrc
Last active December 7, 2016 18:20
# backup folder to hardrive
backup() {
rsync -rltgoDv --ignore-errors --force $HOME /media/$USER/drive
}
# command to rename the current terminal emulator tab
prompt() {
echo -e '\033]2;'$1'\007'
}
# Function to assemble the Git part of our prompt.
git_prompt ()
@adoussot
adoussot / file_case.py
Last active August 9, 2016 22:22
python script for changing the file case
#!/usr/bin/env python3
# coding: utf-8
from __future__ import absolute_import
import os
import re
import sys
from os import listdir
from os.path import isdir, join
@adoussot
adoussot / log_function.py
Last active July 12, 2016 20:25
debug script - log functions name in order to better understand the data-flow (it's not a subtle solution but I find it handy in some cases)
import sys
import re
import fileinput
import time
import pprint
import collections
def main():
"""
"""