Skip to content

Instantly share code, notes, and snippets.

View me-vlad's full-sized avatar

Vlad V. Teteria me-vlad

View GitHub Profile
@me-vlad
me-vlad / gpon_reboot.sh
Last active March 14, 2024 07:30
Reboot HUAWEI based GPON
#!/bin/sh
#
# Reboot HUAWEI based GPON with web control
#
IFS=
echo "Enter GPON username:"
read USER
echo "Enter GPON password:"
@me-vlad
me-vlad / MEGARAC_IPKVM.sh
Created January 23, 2020 15:23
Open MegaRAC IPMI Java IPKVM from CLI
#!/bin/sh
# Script opens Java based IPKVM session on the old AMI MegaRAC IPMI.
# You need javaws (part of the Java JRE) installed.
if [ $# -ne 3 ]; then
echo -e "\n\tUsage:\n\t${0##*/} IPMI_HOST USER PASSWORD\n" && exit 1
fi
HOST="$1"
@me-vlad
me-vlad / Ansible_Vault_passwordstore.md
Last active July 28, 2021 19:01
Ansible Vault passwords and ansible_become_pass variable stored in pass (https://www.passwordstore.org) or gopass

Ansible Vault passwords and ansible_become_pass variable stored in pass https://www.passwordstore.org or gopass https://www.gopass.pw

ansible_become_pass variable in pass/gopass

Create encrypted password file with pass or gopass

pass insert ansible/test or gopass insert ansible/test

Now you can access become password stored in ansible/test using lookup plugin passwordstore

@me-vlad
me-vlad / ffmpeg-nvidia_cuda_nvenc.patch
Created March 4, 2016 01:38
ffmpeg nvidia cuda patches
diff -ruN ffmpeg-orig/libavcodec/Makefile ffmpeg/libavcodec/Makefile
--- ffmpeg-orig/libavcodec/Makefile 2016-03-04 00:17:21.166198276 +0200
+++ ffmpeg/libavcodec/Makefile 2016-03-04 00:18:17.583433360 +0200
@@ -102,7 +102,7 @@
motion_est.o ratecontrol.o \
mpegvideoencdsp.o
OBJS-$(CONFIG_MSS34DSP) += mss34dsp.o
-OBJS-$(CONFIG_NVENC) += nvenc.o
+OBJS-$(CONFIG_NVENC) += nvenc.o nvenc_ptx.o
OBJS-$(CONFIG_PIXBLOCKDSP) += pixblockdsp.o
@me-vlad
me-vlad / dogecoin-1.5.0-fedora-20
Created January 28, 2014 16:31
dogecoin 1.5.0 fedora 20 build workaround - https://github.com/dogecoin/dogecoin/issues/69
github issue: https://github.com/dogecoin/dogecoin/issues/69
quick and dirty workaround:
wget https://github.com/dogecoin/dogecoin/archive/v1.5.0.tar.gz -O dogecoin-1.5.0.tar.gz
tar xfz dogecoin-1.5.0.tar.gz
cd dogecoin-1.5.0
@me-vlad
me-vlad / dogecoin-qt.pro_1.5.0-fedora20.patch
Created January 28, 2014 16:21
dogecoin 1.5.0 fedora 20 patch
--- dogecoin-qt.pro.orig 2014-01-28 04:04:37.000000000 +0200
+++ dogecoin-qt.pro 2014-01-28 17:12:01.743486030 +0200
@@ -3,6 +3,8 @@
macx:TARGET = "Dogecoin-Qt"
VERSION = 1.5.0
INCLUDEPATH += src src/json src/qt
+OPENSSL_INCLUDE_PATH=openssl-1.0.0l/include
+OPENSSL_LIB_PATH=openssl-1.0.0l/ssl
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
@me-vlad
me-vlad / thin.sh
Created March 18, 2012 03:41
init script for multiple thin instances with rbenv shared install
#!/bin/sh
# thin This shell script takes care of starting and stopping
# thin daemon from rbenv shared install
#
# chkconfig: 2345 85 15
# description: thin is an Ruby web server
# config: /etc/sysconfig/thin
### BEGIN INIT INFO
@me-vlad
me-vlad / fabric-1.4.0-files.py.patch
Created March 10, 2012 01:57
fabric-1.4.0 fabric.contrib.files.sed patch
--- files.py.orig 2012-02-14 07:53:02.000000000 +0200
+++ files.py 2012-03-10 14:04:51.323559793 +0200
@@ -153,7 +153,7 @@
"""
func = use_sudo and sudo or run
# Characters to be escaped in both
- for char in "/'":
+ for char in '/"':
before = before.replace(char, r'\%s' % char)
after = after.replace(char, r'\%s' % char)
@me-vlad
me-vlad / s3curl.pl.patch
Created February 14, 2012 21:06
s3curl.pl (http://aws.amazon.com/code/128): fix x-amz-date and aws endpoints patch
--- s3curl.pl.orig 2011-08-16 22:23:39.000000000 +0300
+++ s3curl.pl 2012-02-14 22:37:01.594635639 +0200
@@ -26,11 +26,14 @@
use constant STAT_UID => 4;
# begin customizing here
+# http://docs.amazonwebservices.com/general/latest/gr/rande.html#s3_region
my @endpoints = ( 's3.amazonaws.com',
+ 's3-us-west-2.amazonaws.com',
's3-us-west-1.amazonaws.com',
@me-vlad
me-vlad / youtube-dl-python24.patch
Created January 2, 2012 02:00
youtube-dl Python 2.4 compatibility patch
--- youtube-dl.orig 2012-02-28 00:24:14.664150644 +0200
+++ youtube-dl 2012-02-28 00:27:40.810150644 +0200
@@ -55,6 +55,7 @@
import email.utils
except ImportError: # Python 2.4
import email.Utils
+ email.utils = email.Utils
try:
import cStringIO as StringIO
except ImportError: