This file contains 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 remove_empty_elements(d): | |
"""recursively remove empty lists, empty dicts, or None elements from a dictionary""" | |
def empty(x): | |
return x is None or x == {} or x == [] | |
if not isinstance(d, (dict, list)): | |
return d | |
elif isinstance(d, list): | |
return [v for v in (remove_empty_elements(v) for v in d) if not empty(v)] |
This file contains 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
[Unit] | |
Description=Don't Throttle Me. | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/bash /opt/lenovo_fix/fuck_you_intel.sh | |
StandardOutput=journal | |
[Install] | |
WantedBy=multi-user.target |
This file contains 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
select 'Tcp port: 3306 Unix socket: /tmp/mysql.sock\nTime Id Command Argument' | |
union | |
select concat(date_format(event_time, '%y%m%d %H:%i:%S'), ' ', thread_id, ' ', command_type, '\t', argument) | |
from general_log | |
into outfile '/tmp/test' | |
fields terminated by '' |