Skip to content

Instantly share code, notes, and snippets.

Avatar

Sergey Karatkevich kevit

View GitHub Profile
@shmup
shmup / torrents.md
Last active Sep 21, 2020
transmission blocklist guide
View torrents.md

Transmission Blocklist

The Transmission torrent client has an option to set a Blocklist, which helps protect you from getting caught and having the DMCA send a letter/email.

It's as simple as downloading and installing the latest client:

@gilbarbara
gilbarbara / gitsubmodules.sh
Last active Sep 12, 2020
Install git submodules from a .gitmodules file
View gitsubmodules.sh
#!/bin/sh
set -e
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key path
do
url_key=$(echo $path_key | sed 's/\.path/.url/')
url=$(git config -f .gitmodules --get "$url_key")
git submodule add $url $path
@cecilemuller
cecilemuller / readme.md
Last active Jan 29, 2016
Let's encrypt (Nginx, Ubuntu 14.04 LTS)
View readme.md

Install the client:

apt-get install git
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt

Generate certificates using manual mode:

@dcode
dcode / ol7_addons.repo.sh
Last active May 18, 2020
Enable the OL7 Add-ons repo. Includes virtualbox, docker, R, and others.
View ol7_addons.repo.sh
cat << EOF | sudo tee /etc/yum.repos.d/ol7_addons.repo
[ol7_addons]
name=Oracle Linux $releasever Add ons (\$basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/addons/\$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
EOF
# Verify this manually if you're paranoid like me
@u0d7i
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active Sep 24, 2020
Disable vim automatic visual mode on mouse select
View disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a
View Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@plepe
plepe / gist:52ecc9f18efb32c68d18
Last active Sep 18, 2020
MDADM and LVM cheat sheet
View gist:52ecc9f18efb32c68d18

mdadm

Glossary:

  • md: multiple devices
command description
cat /proc/mdstat show status of all raids
mdadm --detail /dev/md0 detailed status of raid md0
View Port Knocking with Scapy Example
#!/usr/bin/python
"""
Port Knocking with scapy example.
Knock on port 42304
Knock on port 53768
Knock on port 3297
HTTP request to port 19760
Now, to get the flag, we just need to write a small scrip to implement all this logic. We will use the scapy python library to perform the port knocking and curl for the HTTP request part:
@Liryna
Liryna / ARMDebianUbuntu.md
Last active Sep 5, 2020
Emulating ARM on Debian/Ubuntu
View ARMDebianUbuntu.md

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

You can’t perform that action at this time.