Skip to content

Instantly share code, notes, and snippets.

View jayveersolanki's full-sized avatar
🏠
Working from home

Jayveersinh Solanki jayveersolanki

🏠
Working from home
  • Ahmedabad, Gujarat
View GitHub Profile
@mrcomoraes
mrcomoraes / clear_cache_MS_Teams.sh
Last active February 16, 2024 22:55
Clear cache Microsoft Teams on Linux
#!/bin/bash
# This script cleans all cache for Microsoft Teams on Linux
# Tested on Ubuntu-like, Debian by @necrifede, Arch Linux by @lucas-dclrcq and Manjaro with flatpak by @danie1k. Feel free to test/use in other distributions.
# Tested Teams via snap package.
# Tested Teams via flatpak package.
#
# How to use in terminal:
# ./clear_cache_MS_Teams.sh ( deb-stable | deb-insider | snap | flatpak )
# or
@AaronDMarasco-VSI
AaronDMarasco-VSI / Jenkinsfile_snippet.groovy
Created November 8, 2018 16:17
Jenkins detecting changes
// Field ~~ global variable
import groovy.transform.Field
@Field previous_changesets
properties properties: [ // This is ugly https://stackoverflow.com/a/35471196
// ....
parameters([
// ....
booleanParam(defaultValue: false, description: 'Force Rebuild (Job normally aborts for various reasons, e.g. no applicable source changes)', name: 'Force Rebuild'),
]),
@Pamir
Pamir / elasticsearch
Created May 25, 2018 06:54
elasticsearch /etc/rc.d/init.d
#!/bin/bash
#
# elasticsearch <summary>
#
# chkconfig: 2345 80 20
# description: Starts and stops a single elasticsearch instance on this system
#
### BEGIN INIT INFO
@merikan
merikan / Jenkinsfile
Last active April 27, 2024 03:58
Some Jenkinsfile examples
Some Jenkinsfile examples
@monkeym4ster
monkeym4ster / docker.sh
Created July 6, 2017 06:04
Docker: save/load container using tgz file (tar.gz)
#for not running docker, use save:
docker save <dockernameortag> | gzip > mycontainer.tgz
#for running or paused docker, use export:
docker export <dockernameortag> | gzip > mycontainer.tgz
#load
gunzip -c mycontainer.tgz | docker load
@ehayon
ehayon / monitor_du
Last active February 14, 2022 16:34
shell script for monitoring server disk usage
#!/bin/sh
EXCLUDE=( Filesystem devtmpfs tmpfs );
USAGE_THRESHOLD=85;
PREV_IFS=$IFS; # save the old IFS so we can restore it later
IFS="|"; # change the internal field separator to a pipe
EX="${EXCLUDE[*]}"; # join exclude partitions with pipe separator
IFS=$PREV_IFS; # restore IFS
df -h | grep -Ev "^${EX}" | awk '{print $5 " " $1}' | while read output;