Skip to content

Instantly share code, notes, and snippets.

View lbr88's full-sized avatar

Lars Bo Rasmussen lbr88

  • AiO-IT
  • Taastrup, Denmark
View GitHub Profile
@Exchizz
Exchizz / downloadandextract.sh
Last active February 21, 2023 00:08
Proof-of-concept on how "docker-pull" works
#!/bin/bash
# Based on the following question from stack-exchange:
# https://devops.stackexchange.com/questions/2731/downloading-docker-images-from-docker-hub-without-using-docker
# Get token
TOKEN="$(curl --silent --header 'GET' "https://auth.docker.io/token?service=registry.docker.io&scope=repository:library/ubuntu:pull" | jq -r '.token')"
# Get manifest
echo "Manifest: "
@antonbabenko
antonbabenko / ecs-codedeploy
Last active November 16, 2022 23:25
This script performs deployment of ECS Service using AWS CodeDeploy
#!/usr/bin/env bash
#######################################################################
# This script performs deployment of ECS Service using AWS CodeDeploy
#
# Heavily inspired by https://github.com/silinternational/ecs-deploy ,
# which unfortunately can't be used to deploy ECS service when `deployment_option=ECS`
#
# Author: Anton Babenko
# URL: https://github.com/antonbabenko
@shamil
shamil / rundeck_executions_cleanup.sh
Last active August 7, 2024 17:44
Rundeck executions cleanup
#!/bin/bash -e
# see related issue: https://github.com/rundeck/rundeck/issues/357
# export required vars
export RD_URL=http://localhost:4440 RD_USER=admin RD_PASSWORD=admin RD_HTTP_TIMEOUT=300
# make sure rd & jq commands are in the PATH
which -- rd jq >/dev/null
del_executions() {
@mgeeky
mgeeky / openvas-automate.sh
Last active November 12, 2023 19:15
OpenVAS automation script.
#!/bin/bash
#
# OpenVAS automation script.
# Mariusz B. / mgeeky, '17
# v0.2
#
trap ctrl_c INT
# --- CONFIGURATION ---
@paladini
paladini / aws-ec2-redis-cli.md
Last active January 30, 2025 23:20 — forked from todgru/aws-ec2-redis-cli.md
AWS redis-cli without redis server on AWS EC2

Setup redis-cli without the whole Redis Server on AWS EC2

This fast tutorial will teach you how to install redis-clion AWS EC2 without having to install the whole Redis Server. Firstly, SSH into your EC2 instance and run the following command:

$ sudo yum install gcc

This may return an "already installed" message, but that's OK. After that, just run:

$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make && sudo cp src/redis-cli /usr/local/bin/ && sudo chmod 755 /usr/local/bin/redis-cli

biggi() { if [ $# -eq 0 ]; then echo "No arguments specified. Usage:\nbiggi test.md"; return 1; fi
tmpfile=$( mktemp -t transferXXX ); curl --progress-bar --form uploadedfile=@$1 "http://u.biggi.dk/index.php?action=uploadfile" >> $tmpfile; cat $tmpfile | grep -oP '(?<=href=")http://.*?(?=">)' ; rm -f $tmpfile; }
@avalanche123
avalanche123 / timeout.php
Created July 10, 2012 19:12
timeouts in php
<?php
class TimeoutException extends RuntimeException {}
class Timeout
{
private $active;
public function set($seconds)
{