Skip to content

Instantly share code, notes, and snippets.

View maljolani's full-sized avatar

Mohammad Jolani maljolani

View GitHub Profile
@maljolani
maljolani / remove_offline_runners.py
Created June 11, 2024 12:17
remove_offline_runners.py
import requests
# Constants
GITHUB_TOKEN = ''
ORG_NAME = ''
LABEL_FILTER = ''
# Headers for the API requests
headers = {
@maljolani
maljolani / terminate.sh
Last active November 25, 2018 14:31
Bulk AWS instances termination
#!/usr/bin/env bash
# Created by Mohammad AlJolani <[email protected]>
# Github Gist : https://gist.github.com/mohammadjolani/0d29a4b52a493939ad1d2234173555ad
# Termination instances ids should be stored in a file line by line like
# i-05e31789b5688e970
# i-0999e3c0b69e5c81a
LOG_PATH="logs"
@maljolani
maljolani / migrate-redis.py
Last active May 2, 2019 12:50 — forked from metamatik/migrate-redis.py
Migrate Redis data on Amazon ElastiCache
"""
Forked and heavily adappted from:
https://gist.github.com/kitwalker12/517d99c3835975ad4d1718d28a63553e
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
@maljolani
maljolani / install.sh
Last active August 29, 2015 14:07
PHP Development Prepare on Ubuntu
#!/bin/sh
sudo apt-get install tasksel -y
sudo tasksel lamp-server
# JDK-jre required for Netbeans
sudo apt-get install openjdk-7-jre
@maljolani
maljolani / dabblet.css
Last active December 20, 2015 09:59 — forked from LeaVerou/dabblet.css
Loading animation like the one seen on http://www.freeger.com/projects/contextad/ with CSS
/**
* Loading animation like the one seen on http://www.freeger.com/projects/contextad/ with CSS
* Caveat: Not DRY. The content needs to be repeated in a data- attribute (or directly in the CSS).
*/
body {
background: #ccc51c;
min-height: 100%;
}