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
demo |
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
import logging | |
import time | |
import inspect | |
from logging.handlers import RotatingFileHandler | |
from functools import wraps | |
class MyFormatter(logging.Formatter): | |
def format(self, record): |
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
#!/bin/bash | |
# Make sure your lists are in UTF-8. | |
# By default, on Windows, a downloaded file is saved using UTF-16 LE | |
# You can use the [convertutf16letoutf8.sh](https://gist.github.com/edi33416/834336a6866715088af2e603dfac4c01#file-convertutf16letoutf8-sh) script | |
if [ ! $# -eq 1 ] | |
then | |
echo -e "Error: wrong arguments.\n\tUsage: $0 <stud-attendance-list-dir>" | |
exit 1 |
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
#!/bin/sh | |
# Credits to: | |
# - http://vstone.eu/reducing-vagrant-box-size/ | |
# - https://github.com/mitchellh/vagrant/issues/343 | |
aptitude -y purge ri | |
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide | |
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30 | |
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5 |
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
# gdb configuration file | |
# place contents in ~/.gdbinit | |
source /home/fawkes/ws/pwndbg/gdbinit.py | |
# auto-load directory in which we run gdb, so we can have a | |
# .gdbinit per project directory | |
add-auto-load-safe-path . | |
# path to your library. Multiple dirs can be separated by ':' as in the comment below | |
set directories /home/fawkes/ws/glibc/glibc-2.31/stdio-common/ |
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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
// Add custom actions and keybindings to this array. | |
// To unbind a key combination from your defaults.json, set the command to "unbound". | |
// To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings | |
"actions": | |
[ | |
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json. | |
// These two lines additionally bind them to Ctrl+C and Ctrl+V. | |
// To learn more about selection, visit https://aka.ms/terminal-selection |
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
{ | |
"data-root": "/home/edis/docker-data" | |
} |
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
#!/bin/bash | |
is_on_windows=1 | |
if [ is_on_windows -eq 1]; then | |
for i in *.csv; do | |
powershell.exe -Command "Get-Content \"$i\" -Encoding Unicode | Set-Content -Encoding UTF8 \"r_$i\"" | |
done | |
else | |
mkdir utf-8 |
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
{ | |
"background": "#ffffaf", | |
"black": "#282828", | |
"blue": "#076678", | |
"brightBlack": "#A89984", | |
"brightBlue": "#076678", | |
"brightCyan": "#427B58", | |
"brightGreen": "#79740E", | |
"brightPurple": "#8F3F71", | |
"brightRed": "#9D0006", |
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
/* | |
* Hook main() using LD_PRELOAD, because why not? | |
* Obviously, this code is not portable. Use at your own risk. | |
* | |
* Compile using 'gcc hax.c -o hax.so -fPIC -shared -ldl' | |
* Then run your program as 'LD_PRELOAD=$PWD/hax.so ./a.out' | |
*/ | |
#define _GNU_SOURCE | |
#include <stdio.h> |
NewerOlder