Skip to content

Instantly share code, notes, and snippets.

View ntrp's full-sized avatar
💭
'Everything is fine'

Ivan Gregurić Ortolan ntrp

💭
'Everything is fine'
  • Freelancer
  • Stuttgart, DE
  • 02:49 (UTC +02:00)
View GitHub Profile
@ntrp
ntrp / QArch.ahk
Created November 24, 2019 17:13
Windows Console show/hide shortcut
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
F1::
DetectHiddenWindows, on
IfWinExist, ahk_exe Arch.exe
{
IfWinActive, ahk_exe Arch.exe
{
WinHide, ahk_exe Arch.exe

Keybase proof

I hereby claim:

  • I am ntrp on github.
  • I am ntrp (https://keybase.io/ntrp) on keybase.
  • I have a public key ASAdtMPBBH6Nm3thkawkgbK94GLmj_QV01SsvuYYWcMV8Qo

To claim this, I am signing this object:

@ntrp
ntrp / ssl.conf
Created February 1, 2017 08:52
SSL configuration for high security rating
# HTTP Strict Transport Security: tells browsers to require https:// without first checking
# the http:// version for a redirect. Warning: it is difficult to change your mind.
#
# max-age: length of requirement in seconds (31536000 = 1 year)
# includeSubdomains: force SSL for *ALL* subdomains (remove if this is not what you want)
# preload: indicates you want browsers to ship with HSTS preloaded for your domain.
#
# Submit your domain for preloading in browsers at: https://hstspreload.appspot.com
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
# prepare
cfdisk /dev/sdx (part 7 [NTFS,exFAT], bootable flag)
mkfs.ntfs -f /dev/sdx1
# MBR
ms-sys -7 /dev/sdx
or lilo -M /dev/sdx MBR
or dd if=/usr/lib/syslinux/bios/mbr.bin of=/dev/sdx
# mount
@ntrp
ntrp / arch-linux-install
Created June 2, 2016 11:37 — forked from binaerbaum/arch-linux-install
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swiss-french keymap
#!/bin/bash
function usage {
echo
echo "usage: trustcert <ALIAS> <FILE>"
echo
}
[[ $# -ne 2 ]] && usage && exit 1
@ntrp
ntrp / youtube stream ffmpeg
Last active July 7, 2016 16:00 — forked from laurenarcher/livestreamingyoutube
Live Streaming to Youtube - Linux/Ffmpeg/PulseAudio/Generic Webcam
One webcam:
ffmpeg -f alsa -ac 2 -i pulse -f v4l2 -s 1280x720 -r 10 -i /dev/video0 -vcodec libx264 -pix_fmt yuv420p101e -preset ultrafast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 4 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMKEY
Two webcam overlay:
ffmpeg -f alsa -ac 2 -i pulse -f v4l2 -s 1280x720 -r 10 -i /dev/video1 -f v4l2 -s 320x240 -r 10 -i /dev/video0 -filter_complex "[1:v]setpts=PTS-STARTPTS[bg]; [2:v]setpts=PTS-STARTPTS[fg]; [bg][fg]overlay=shortest=1 [out]" -map "[out]" -map 0:a -vcodec libx264 -pix_fmt yuv420p -preset veryfast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 6 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMKEY
@ntrp
ntrp / Proxy_Automation
Created November 20, 2013 18:16
Automation script for network reconition and proxy automation.
#!/bin/sh
IF=$1
STATUS=$2
WIFI="wlp2s0"
LAN="enp3s0"
NETMASK_WIFI_HOME="192.168.1.1/24"
NETMASK_WIFI_ANDROID="192.168.43.255/24" # Android HotSpot has always same netmask
NETMASK_LAN_HOME="192.168.1.1/24"