Skip to content

Instantly share code, notes, and snippets.

View Strykar's full-sized avatar
💭
What is Bash?

Avinash H. Duduskar Strykar

💭
What is Bash?
  • India
View GitHub Profile
IP Address Location
89.187.177.134 NYC
89.187.177.138 NYC
89.187.177.196 NYC
89.187.178.130 NYC
89.187.179.35 NYC
89.187.185.130 LAX
89.187.185.153 LAX
# Maintainer: Strykar <strykar@hotmail.com>
pkgname=go-livepeer-bin
_pkgname=go-livepeer
pkgver=0.5.21
pkgrel=1
pkgdesc='Official Go binaries of the Livepeer protocol'
arch=('x86_64')
url='https://github.com/livepeer/go-livepeer'
license=('MIT')
@Strykar
Strykar / livepeer.service
Last active September 30, 2021 11:58
Livepeer systemd service
[Unit]
Description=Start the Go-Livepeer Orchestrator and Transcoder service
After=network.target
Wants=network-online.target
# See https://www.cyberciti.biz/faq/linux-hide-processes-from-other-users/
[Service]
Restart=always
Type=simple
EnvironmentFile=/etc/go-livepeer/environment
@Strykar
Strykar / environment
Created September 30, 2021 11:39
Livepeer systemd environment
ethaddr=0x1a00000000000000000000000000000000000000
ethurl=https://mainnet.infura.io/v3/00000000000011111111110000000000
ethpass=mywalletpassword
maxgas=40000000000
unitprice=800
serviceaddr=my.livepeer.node:8935
sesh=6
cliaddr=192.168.10.1:7935
rew=false
mon=false
@Strykar
Strykar / myruleset.nft
Last active June 22, 2021 12:12
Create a set similar to ipset in nftables for large IP groups
# ASN 18207 YouBroadBand
# 103.247.210.0/24
# 103.39.4.0/23
# 103.48.96.0/22
# 103.5.70.0/24
# 123.201.0.0/16
# 150.107.208.0/22
# 175.100.128.0/19
# 196.1.104.0/24
# 203.109.64.0/18
#!/hint/bash
#
# /etc/makepkg.conf
#
#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
@Strykar
Strykar / _README.md
Last active January 14, 2021 02:39
Bash General-Purpose Yes/No Prompt Function ("ask")

This is a general-purpose function to ask Yes/No questions in Bash, either with or without a default answer. It keeps repeating the question until it gets a valid answer.

@Strykar
Strykar / gist:377ba77479e974326cb19aa894c8ee79
Created December 29, 2020 03:12
gawk crushing busybox awk
root@apu:~# time awk 'BEGIN { OFMT = "%.0f"; for (i = 0; i < 50000; i++) print (95/100 * 42) }' > /dev/null
real 0m0.517s
user 0m0.435s
sys 0m0.081s
root@apu:~# time awk 'BEGIN { for (i = 0; i < 50000; i++) printf("%.0f\n", (95/100 * 42)) }' > /dev/null
real 0m0.862s
user 0m0.624s
sys 0m0.237s
==========
VULKANINFO
==========
Vulkan Instance Version: 1.2.153
Instance Extensions: count = 17
===============================
VK_EXT_acquire_xlib_display : extension revision 1
@Strykar
Strykar / pacman-last-used.sh
Last active August 25, 2020 14:08 — forked from mtekman/pacman-last-used.sh
Determining the least used packages installed on your system
#!/usr/bin/bash
function pacman-last-used {
storage_dir=${HOME}/.config/pacman-last
mkdir -p "$storage_dir"
unsorted=$storage_dir/"packages.1.exec_bins.log"
sorted=$storage_dir/"packages.2.exec_bins.sorted"
sorted_packs=$(mktemp) #"3.packages.sorted"