Skip to content

Instantly share code, notes, and snippets.

@ohumeagle
ohumeagle / isshtool.sh
Last active September 22, 2019 08:21
by iSSHtool bash script, Network Engineers can connect to network devices simply and save credentials in Linux Os.
#!/bin/bash
# Name: SSH Client for Network Engineers
# Author: Saman Jalilian
# Mail: ohumeagle@gmail.com
# introduction: This simple script helps you to connect to your network devices with SSH and let you save your passwords as an enrypted file.
# - the session log will be generated day by day in the root directory which scrip runs.
# Usage: put your device information and credentials in root directory file with .conf extention (you can have multiple file) in below format and then encrypt it
# With gpg tool, so the final encrypted extension should be like this *.conf.pgp
# use this command to encrypt your file: gpg --yes --batch --passphrase=123 -c testfile.conf
# Format:
@SQLadmin
SQLadmin / xtrabackup_full_increment_restore.sh
Last active March 15, 2024 17:34
Automate xtrabackup for FULL/Incremental and restore
#!/bin/bash
# This is my production backup script.
# https://sqlgossip.com
set -e
set -u
usage() {
echo "usage: $(basename $0) [option]"
echo "option=full: Perform Full Backup"
@lukeplausin
lukeplausin / bash_aws_jq_cheatsheet.sh
Last active July 15, 2024 09:10
AWS, JQ and bash command cheat sheet. How to query, cut and munge things in JSON generally.
# Count total EBS based storage in AWS
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add"
# Count total EBS storage with a tag filter
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add"
# Describe instances concisely
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]'
# Wait until $instance_id is running and then immediately stop it again
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id
# Get 10th instance in the account
@wavezhang
wavezhang / java_download.sh
Last active July 15, 2024 09:36
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@tawateer
tawateer / dnscrypt-proxy.sh
Last active January 9, 2019 02:50
sniproxy + dnscrypt-proxy + dnscrypt-wrapper + dnsmasq 相关脚本
#!/bin/bash
sudo su -
wget http://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-proxy-1.6.0.tar.gz
tar xvzf dnscrypt-proxy-1.6.0.tar.gz
cd dnscrypt-proxy-1.6.0
./configure
make
make install
cd ..
@roylines
roylines / haproxy.cfg
Last active July 15, 2023 02:45
haproxy configuration for using with prerender.io
# Change YOUR_TOKEN to your prerender token
# Change http://example.com (server_name) to your website url
frontend my-frontend
mode http
bind :80
# prerender.io
acl user-agent-bot hdr_sub(User-Agent) -i baiduspider twitterbot facebookexternalhit rogerbot linkedinbot embedly showyoubot outbrain pinterest slackbot vkShare W3C_Validator
acl url-asset path_end js css xml less png jpg jpeg gif pdf doc txt ico rss zip mp3 rar exe wmv doc avi ppt mpg mpeg tif wav mov psd ai xls mp4 m4a swf dat dmg iso flv m4v torrent ttf woff
@fzerorubigd
fzerorubigd / blocked
Last active August 29, 2015 14:16
block list for cow, in iran. please add anything you need
code.google.com
googleapis.com
googleusercontent.com
ytimg.com
youtube.com
youtube-nocookie.com
bitbucket.org
thepiratebay.se
humblebundle.com
plus.url.google.com
@xdamman
xdamman / install_ffmpeg_ubuntu.sh
Created July 2, 2014 21:03
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 15, 2024 12:10
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
~/.cow/rc =>
listen = http://0.0.0.0:7070 # <-- Multiple line is allowed for multiple port
#logFile =
#alwaysProxy = true <- if you want to pass always over the proxy
loadBalance = backup/latency # <-- Choose backup or latency
# One is enaugh, but cow can do load balance :) ==> Start parent proxy list
proxy = ss://<enc-method>:<password>@<host>:<port> #<-- shadowsocks server
proxy = http://user:password@host:port # <--http(s) server