Skip to content

Instantly share code, notes, and snippets.

@a-sync
a-sync / etd0108.rst
Created November 17, 2016 21:02 — forked from admkng/etd0108.rst
Asus X750L touchpad not detected in Ubuntu

The Asus X750L touchpad manufactured by elantech (ETD0108) isn't detected in recent versions of Ubuntu and Arch Linux. To get it working, add the following kernel parameter to your grub line:

i8042.noloop

To make it permanent, add it to the GRUB_CMDLINE_LINUX_DEFAULT variable in /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="i8042.noloop quiet splash"

Then run:

@a-sync
a-sync / cisco_decrypt.c
Created December 6, 2016 07:01
Decoder for password encoding of Cisco VPN client
/* Decoder for password encoding of Cisco VPN client.
Copyright (C) 2005 Maurice Massar
Thanks to HAL-9000@evilscientists.de for decoding and posting the algorithm!
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@a-sync
a-sync / m3u8-ts-ripper.sh
Created November 19, 2017 10:14
Rip and concat MPEG2 playlists with ffmpeg
#!/bin/bash
# Rip and concat MPEG2 playlists with ffmpeg
read -p 'URL: ' urlvar
read -p 'File name: ' filenamevar
ffmpeg -i ${urlvar} -c copy -bsf:a aac_adtstoasc ${filenamevar}.mp4
@a-sync
a-sync / clean-docker-log.sh
Last active April 8, 2019 08:24
Clean the logs of a specific docker container
#!/bin/bash -e
CONTAINER=$1
echo "" > $(docker inspect --format='{{.LogPath}}' ${CONTAINER})
@a-sync
a-sync / .bash_aliases
Last active November 5, 2019 07:44
SSH / SCP wrapper with password configuration support
alias ssh=ssh-wrapper
alias scp=scp-wrapper
@a-sync
a-sync / embedded_nodejs.bat
Last active October 23, 2020 07:09
A single batch file that downloads a nodejs binary and runs the code embedded in itself. (for windows 7 and above)
if ("0"=="1") /*
@echo off
set args=%*
setlocal ENABLEDELAYEDEXPANSION
if not exist %TEMP%\node.exe (
echo DOWNLOADING RUNTIME...
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://nodejs.org/dist/latest/win-x64/node.exe', '%TEMP%\node.exe')"
echo DOWNLOAD COMPLETE!
)
@a-sync
a-sync / install-opencv.sh
Last active November 25, 2021 12:36
OpenCV + extra modules install script for Ubuntu 16.04
#!/bin/bash
# https://gist.github.com/a-sync/276fbb5776ad5d5775d1bd6205e22a4a
OPENCV_VERSION="3.4.3"
read -p "Install/update dependencies? ([Yy] or skip this step) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
@a-sync
a-sync / ofcra-local-mod-dl.bat
Created November 26, 2021 09:06
OFCRA local mod downloader / updater: parses Arma 3 launcher preset files in the current folder and attempts to download and unpack non workshop mods from the OFCRA mod repository.
@echo off
rem # OFCRA local mod downloader / updater
rem # Parses Arma 3 launcher preset files in the current folder and attempts
rem # to download and unpack non workshop mods from the OFCRA mod repository.
rem # https://ofcrav2.org/index.php?page=repository-en
rem #
rem # Usage:
rem # 1. Create a folder for your local mods and place this script and the
rem # Arma 3 launcher preset file in there
rem # 2. Run the script and let it download and unpack the non workshop mods
@a-sync
a-sync / radio1-downloader.bat
Last active May 31, 2023 20:25
radio1.hu tracklista URL alapján letölti az mp3 fájlokat
@echo off
title radio1-downloader @ https://gist.github.com/a-sync
powershell -NoProfile -ExecutionPolicy Unrestricted -Command "[System.Net.ServicePointManager]::SecurityProtocol=[System.Net.SecurityProtocolType]::Tls12;[System.Net.WebRequest]::DefaultWebProxy.Credentials=[System.Net.CredentialCache]::DefaultCredentials;$Url=Read-Host -Prompt 'radio1.hu URL';$wc=New-Object System.Net.WebClient;$wc.Encoding=[System.Text.Encoding]::UTF8;$Links=$wc.DownloadString($Url.Trim())|Select-String -Pattern '<audio data-artist=\""(.*?)\"" data-title=\""(.*?)\"".*?>\n.*?<source src=\""(.*?)\"" type=\""audio/mp3\"">' -AllMatches;Foreach($i in $Links.Matches){$Name=\""$($i.Groups[1].Value) $($i.Groups[2].Value)\"".Split([IO.Path]::GetInvalidFileNameChars()) -join '_';Write-Host $Name;$wc.Headers.Add('Referer','https://www.radio1.hu');$wc.DownloadFile(\""https://www.radio1.hu$($i.Groups[3].Value)\"",\""$Name.mp3\"")}"
@a-sync
a-sync / nava.downloader.bat
Last active November 21, 2023 20:54
nava.hu URL alapján letölti a videót yt-dlp segítségével
@if (@a==@b) @end /*
@echo off & setlocal enabledelayedexpansion
title nava.downloader.bat @ https://gist.github.com/a-sync
if "%~1"=="/?" goto usage
if %0 == "%~0" (
set /p INPUT="nava.hu URL: "
) else (
set "INPUT=%~1"
)