Skip to content

Instantly share code, notes, and snippets.

View redsfyre's full-sized avatar
:shipit:
There is nothing here -> /dev/null

Yasin İsa YILDIRIM redsfyre

:shipit:
There is nothing here -> /dev/null
View GitHub Profile
@thimslugga
thimslugga / 01_setup-docker-al2023.md
Last active June 2, 2025 19:38
Setup Docker on Amazon Linux 2023

Setup Docker on Amazon Linux 2023

The following guide is for setting up Docker with docker-compose v2 on Amazon Linux 2023. The steps are intendend for AL2023 on EC2 but should mostly work for the AL2023 VMs running on other hypervisors.

Install and configure Docker on Amazon Linux 2023

Install Base OS Packages

Install the following packages, which are good to have installed:

@jso8910
jso8910 / nyarchascii
Created March 13, 2021 01:31
Just run `neofetch --ascii nyarchascii --gap '-250'`
\033[38;2;113;199;242m x*
&@&
&@@@&
&@@@@@@
@@@@@@@@x
@@@@@@@@@&0xx
0@@@@@@@@@@@@@
&@@@@@@@@@@@@
&@@@@@@@@@@@@@&
&@@@@@@@@@@@@@@@&

Usb autosuspend disable:

echo -1 > /sys/module/usbcore/parameters/autosuspend

Fix USB cable is bad or device descriptor issue

echo Y | tee /sys/module/usbcore/parameters/old_scheme_first

Wifi power save mode disable

@ChrisTitusTech
ChrisTitusTech / fixlocale.sh
Created October 27, 2020 21:51
Fix Locales in any distro
#!/bin/bash
echo "LC_ALL=en_US.UTF-8" | sudo tee -a /etc/environment
echo "en_US.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
echo "LANG=en_US.UTF-8" | sudo tee -a /etc/locale.conf
sudo locale-gen en_US.UTF-8
@Ovid
Ovid / grep.pm
Last active May 12, 2022 12:36
A small hack to add a 'sqitch grep ...' command that sorts things in the order of the sqitch plan
package App::Sqitch::Command::grep;
use 5.010;
use strict;
use warnings;
use utf8;
use App::Sqitch::X qw(hurl);
use Moo;
use App::Sqitch::Target;
use App::Sqitch::Types qw(Str Enum Target Bool);
@skhatri
skhatri / fluentd-elasticsearch-logging-timestmap.md
Last active December 17, 2022 11:34
FluentD to Elasticsearch Index with Custom Timestamp

This is an example of forwarding logs to elasticsearch using fluentd. In the process, it does use a custom time key.

The setup

Run Elasticsearch and FluentD locally

#run elasticsearch
docker run -e discovery.type=single-node -e xpack.security.enabled=false -p 9200:9200 -d elasticsearch:7.2.0
#install fluentd
@sh4dowb
sh4dowb / eba-canli-ders.md
Last active March 21, 2023 16:49
EBA canlı ders için Linux ve Mac desteği (Zoom)
@Glamdring
Glamdring / CassandraJSONToCQL.java
Created November 2, 2019 20:17
Convert Cassandra sstabledump JSON to CQL
package com.logsentinel.util.db;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.logsentinel.util.db.dump.Cell;
import com.logsentinel.util.db.dump.Info;
import com.logsentinel.util.db.dump.Row;
import org.apache.commons.lang3.StringUtils;
import java.io.File;
@tuxfight3r
tuxfight3r / openshift_cli_tricks.MD
Last active March 30, 2023 18:02
openshift cli tricks - using go templates

openshift list all pods and thier specs (requests/limits)

oc get pod -o jsonpath='{range .items[*]}{"SPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n"}{end}'

openshift list all pods and thier specs with name (requests /limits)

oc get pod -o jsonpath='{range .items[*]}{"NAME:  "}{.metadata.name}{"\nSPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n\n"}{end}'