Skip to content

Instantly share code, notes, and snippets.

View rashkur's full-sized avatar
:octocat:

Roman S rashkur

:octocat:
View GitHub Profile
@nerdyslacker
nerdyslacker / void_gnome.md
Last active April 7, 2025 14:08
[Void Linux + GNOME] void linux configuration from scrath with gnome de #linux #void #gnome
@pradhyu
pradhyu / undefinedVariable.groovy
Last active March 21, 2023 15:48
Check if a variable is undefined in groovy
// checking bindings snippets
if (binding.hasVariable('superVariable')) {
// your code here
}
An easy solution to this is the following:
if (binding.variables.containsKey("bindingVar")) {
// do something
}
Or if you’d like to get a null value for an optional binding:
# Homebrew has done away with options in all of their core formulas
# discussion on this change here: https://github.com/Homebrew/homebrew-core/issues/31510
# Instead, Use the last version of the homebrew forumla that still supported them.
# the formula is here: https://raw.githubusercontent.com/Homebrew/homebrew-core/90e6931235a333899bd2572353ca065bd5535452/Formula/ffmpeg.rb
# install it like this:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/90e6931235a333899bd2572353ca065bd5535452/Formula/ffmpeg.rb \
--with-aom \
--with-chromaprint \
#!/usr/bin/env python3
import asyncio
import socket
async def handle_echo(reader, writer):
addr = writer.get_extra_info('peername')
while True:
data = await reader.read(4096)
@Ray33
Ray33 / gist:ba189a729d81babc99d7cef0fb6fbcd8
Last active July 22, 2022 10:50 — forked from SamCyanide/gist:780afff4c3e1a9e105264c2a476e037c
Amazon Elastic Network Adapter (ENA) on CentOS 7
sudo su
yum --enablerepo=extras install epel-release
yum -y install patch dkms kernel-devel perl
yum update
#Required for kernel num 5:
yum --enablerepo=elrepo-kernel -y install kernel-ml-devel
reboot
@soderlind
soderlind / Install.txt
Last active September 7, 2024 05:45
macOS DoH! (DNS over HTTPS) using cloudflared
1) Install cloudflared using homebrew:
brew install cloudflare/cloudflare/cloudflared
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content
proxy-dns: true
proxy-dns-upstream:
- https://1.1.1.1/dns-query
- https://1.0.0.1/dns-query
@akira345
akira345 / rds_log_download.py
Last active April 3, 2020 11:25
Python勉強がてら作成した、RDSのログファイルを一括ダウンロードするスクリプトです。日付ごとにディレクトリを作成して格納します。
# Import the SDK
import boto3
import datetime
import os
rds = boto3.client('rds', region_name='us-east-1')
db_instance_identifier = "mysql-db"
log_base_path = "./log/"
@rashkur
rashkur / as.bash
Last active December 19, 2019 10:47
Autonomous system (ASN) lookup
#!/usr/bin/expect
#"AS61119,AS60863,AS51286,AS49988,AS49797,AS47764,AS21051,AS206494,AS47764":"mailru,odnoklassniki", "AS47541,AS47542,AS28709":"vkontakte", "AS43247,AS207207,AS202611,AS13238":"yandex"
set timeout 60
log_user 0
spawn telnet route-server.he.net
foreach as {61119 60863 51286 49988 49797 47764 21051 206494 47764 47541 47542 28709 43247 207207 202611 13238 1} {
expect {
"route-server> " {
@ibrahimlawal
ibrahimlawal / LC_CTYPE.txt
Created February 27, 2017 07:02 — forked from jampajeen/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@oifland
oifland / Jenkinsfile
Last active July 15, 2024 06:36
Loops in Jenkinsfiles
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
echo_all(abcs)
}
stage('Test 2: loop of sh commands') {