Skip to content

Instantly share code, notes, and snippets.

View rabin-io's full-sized avatar

Rabin Yasharzadehe rabin-io

View GitHub Profile
@rabin-io
rabin-io / tcset.py
Created January 2, 2020 21:19
WIP: Ansible tc Module (Utilizes tcconfig on the client machine)
#!/usr/bin/python
# Copyright: (c) 2018, Terry Jones <terry.jones@example.org>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# from lib.ansible.modules.system.iptables import push_arguments
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
@rabin-io
rabin-io / 88-MASTER-DISPATCHER
Last active October 23, 2018 20:08
88-MASTER-DISPATCHER
#!/bin/bash
[[ -z ${CONNECTION_UUID} ]] && exit 0
DEVICE=${1}
STATE=${2}
CWD=$(dirname "$0")
LOG='/var/log/NetworkManager_dispatcher.d.log'
<?php
/***********************************************************************************
*
* A minimal example showing how to handle the OAuth login process and make API calls
* using the Salesforce REST interface in PHP
*
* By Pete Warden, October 28th 2010
*
* Freely reusable with no restrictions
@rabin-io
rabin-io / gitkraken-install-update.sh
Last active April 16, 2019 18:28 — forked from seangtkelley/gitkraken-install.sh
Install Script for Gitkraken on Fedora 27 + Launcher Icon
#!/bin/bash
if [[ ${UID} -ne 0 ]];
then
echo 'This script need to be run with root permissions'
echo "(we assume you don't have write access to /opt)"
exit
fi
@rabin-io
rabin-io / virt-delete
Last active April 18, 2018 16:24 — forked from larsks/virt-delete
A shell script for deleting a libvirt domain and associated storage
#!/bin/sh
echo "Destroy: $1"
virsh destroy $1 2> /dev/null
for disk in $(virsh -q domblklist $1 | awk '{print $2}'); do
pool=$(virsh vol-pool $disk)
name=$(virsh vol-info $disk | awk '$1 == "Name:" {print $2}')
echo "Delete volume: $disk ($name in $pool)"
@rabin-io
rabin-io / bucklespring.spec
Last active May 29, 2021 23:40
bucklespring.spec
Name: bucklespring
Version: 1.5.0
Release: 1%{?dist}
Summary: Nostalgia bucklespring keyboard sound
Group: Applications/Multimedia
License: GPLv2
URL: https://github.com/zevv/bucklespring
#Source0: https://github.com/rabin-io/bucklespring/archive/v%{version}.tar.gz
@rabin-io
rabin-io / pre-compress-web-assets
Last active November 15, 2019 19:24
Recursively pre-compress (gzip) CSS/JavaScript/webfont assets for use Nginx and the HttpGzipStaticModule module.
#!/bin/bash
###########################################################################
# Usage:
# pre-compress-web-assets [.|folder_name]
#
# This script will recursively look for the files in the $ext variable
# and compress/re-compress them.
#
# By default it will look into the current working folder,