Skip to content

Instantly share code, notes, and snippets.

View driversti's full-sized avatar
🦝
Have been making 🪲 since birth

Yurii Chekhotskyi driversti

🦝
Have been making 🪲 since birth
View GitHub Profile
@driversti
driversti / start_cpu_stress.sh
Created October 12, 2023 06:04
Load Oracle instance
#!/bin/bash
# start_cpu_stress.sh
# Calculate the desired CPU limit based on the total number of cores
total_cores=1
desired_load_percentage=90
cpu_limit=$(awk -v cores="$total_cores" -v perc="$desired_load_percentage" 'BEGIN { printf "%d", cores * perc }')
echo "CPU limit: $cpu_limit%"
@FreddieOliveira
FreddieOliveira / docker.md
Last active June 21, 2024 10:26
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@webketje
webketje / README.md
Last active June 21, 2024 06:47
Soundcloud Downloader Clean - Tampermonkey userscript OR bookmarklet

Tampermonkey userscript - Soundcloud Downloader Clean

An ad-less, multilingual, clean Soundcloud downloader with robust code. Adds a 'Download' button to all single track views.

Features

  • No third-party embeds, redirects or ads, directly uses the Soundcloud API.
@baberali
baberali / LoggingFilter.java
Created August 15, 2016 11:48
Instead of writing your own classes to cache request response for logging, Spring provides a couple of useful classes i.e. ContentCachingRequestWrapper and ContentCachingResponseWrapper. These classes can be utilized very effectively, for example, in the following little filter:
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
@MichaelPote
MichaelPote / himawari.ps1
Created February 3, 2016 19:11
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
@BlakeGardner
BlakeGardner / install nano.sh
Last active May 14, 2024 06:45
Syntax highlighting in nano on Mac OS
# Last updated May, 2024 for Apple silicon Macs
# Install Homebrew if you don't already have it: https://brew.sh
# install nano from homebrew
brew install nano nanorc
# update your nanorc file
echo 'include "'"$(brew --cellar nano)"'/*/share/nano/*.nanorc"' >> ~/.nanorc
# close and re-open your terminal and you'll have syntax highlighting
@bradmontgomery
bradmontgomery / dummy-web-server.py
Last active June 11, 2024 08:36
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python (Updated for Python 3.7)
Usage:
./dummy-web-server.py -h
./dummy-web-server.py -l localhost -p 8000
Send a GET request: