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
<?xml version="1.0" ?> | |
<repositories version="1.0"> | |
<repo priority="50" quality="experimental" status="unofficial"> | |
<name>plesiv-overlay</name> | |
<description>Personal overlay for Gentoo Linux</description> | |
<homepage>http://github.com/plesiv/plesiv-overlay</homepage> | |
<owner> | |
<email>zplesivcak.work@gmail.com</email> | |
</owner> |
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
#!/usr/bin/env python | |
""" | |
Configurable password generator | |
Usage instructions: | |
1. Configure generator by modifying values below | |
2. Execute script | |
""" | |
from random import shuffle |
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
#!/usr/bin/env bash | |
# | |
# Installs Kernel modules on ramdisk and/or creates uramdisk from ramdisk. | |
# | |
# Tested on Ubuntu. | |
# Invoking with arguments: | |
# -m > install kernel modules on ramdisk | |
# -u > create uramdisk from ramdisk | |
# -mu / no arguments > do both |
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
#!/usr/bin/env sh | |
# source: http://askubuntu.com/questions/194705/how-do-i-get-a-usb-drive-shortcut-on-desktop | |
# Show volumes on desktop | |
gsettings set org.gnome.nautilus.desktop volumes-visible true | |
# Don't auto-open mounted volumes | |
gsettings set org.gnome.desktop.media-handling automount-open false |
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
# Configuration | |
BIN_NAME := app_bin.elf | |
SRC_PATH := src | |
INC_PATH := include | |
LIB_PATH := lib | |
BUILD_PATH := build | |
CC := gcc | |
CFLAGS := -Wall -O0 -g3 | |
LDFLAGS := |
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
Debugging embedded system over ethernet with GDB (and gdbserver) | |
Prerequisite: host and target should be connected over network. | |
I - on target | |
* needed: | |
- compiled program that needs to be debugged (doesn't need | |
debugging symbols in it), | |
- gdbserver executable |
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
/* | |
ID: dnkihot1 | |
LANG: C++ | |
TASK: combo | |
*/ | |
#include <iostream> | |
#include <fstream> | |
#include <set> | |
using namespace std; |
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
mkdir /mnt/gentoo | |
mount /dev/sda4 /mnt/gentoo | |
mount /dev/sda2 /mnt/gentoo/boot/ | |
mount -t proc proc /mnt/gentoo/proc/ | |
mount --rbind /sys /mnt/gentoo/sys | |
mount --make-rslave /mnt/gentoo/sys | |
mount --rbind /dev /mnt/gentoo/dev | |
mount --make-rslave /mnt/gentoo/dev/ |
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
# save all tagged Docker images in the current directory | |
svimgs() { local image_ids=$(docker images | tail -n+2 | awk '{print $1 ":" $2}'); for id in $image_ids; do cdir=$(dirname $id); mkdir -p $cdir; docker save -o $id $id; done } | |
# load in Docker all images from the current directory | |
ldimgs() { local image_files=$(find -type f); for file in $image_files; do docker load --input $file; done } | |
# remove all images from Docker | |
rmimgs() { docker rmi -f $(docker images | tail -n+2 | awk '{print $3}' | sort -u); } | |
# clean <none> images | |
cleanimgs() { docker rmi -f $(docker images | grep '<none>' | awk '{print $3}' | sort -u); } | |
# kill all containers |
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
# normalize string given as an argument | |
n() { sed -e 's/^[ -]\+//' -e 's/[ -]\+$//' -e 's/[ ()-]\+/-/g' -e "s/'//g" | tr '[:upper:]' '[:lower:]' $1; } | |
# normalize name of the single file (renames file) | |
m() { mv "$1" "$(echo $1 | n)"; } | |
# normalize names of all files in the current directory | |
f() { for i in *; do m "$i"; done; } |
OlderNewer