Skip to content

Instantly share code, notes, and snippets.

View Nicklas2751's full-sized avatar

Nicklas Wiegandt Nicklas2751

View GitHub Profile
@pablodz
pablodz / install_docker_in_ubuntu_21-10.sh
Last active June 17, 2023 20:58
Install Docker in Ubuntu 21.10, Install Dockercompose on Ubuntu 21.10
# [🟨OPTIONAL] Uninstall old docker versions
sudo apt-get remove docker docker-engine docker.io containerd runc
# Refresh latest version
sudo apt-get update
# Install pre-req
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
@pahud
pahud / ecs_task_runner.js
Created June 25, 2016 07:06
ECS task runner with Lambda
var AWS = require('aws-sdk')
var ecs = new AWS.ECS();
exports.handler = (events, context) => {
// CLI example:
// aws --region ap-northeast-1 ecs run-task --task-definition my_task_def
/* input event payload sample:
{
@hayderimran7
hayderimran7 / groovy-create-user.md
Last active April 10, 2024 17:29
Jenkins Groovy enable security and create a user in groovy script

This is a snippet that will create a new user in jenkins and if security has been disabled , it will enable it :)

import jenkins.model.*
import hudson.security.*

def instance = Jenkins.getInstance()

def hudsonRealm = new HudsonPrivateSecurityRealm(false)
hudsonRealm.createAccount("MyUSERNAME","MyPASSWORD")
instance.setSecurityRealm(hudsonRealm)
@klausbayrhammer
klausbayrhammer / cherry pick to multiple branches
Created October 10, 2014 12:52
cherry-pick a commit to multiple branches
#!/bin/bash
function merge {
git pull --rebase
git cherry-pick -x $1
git status
echo "Commit? (y/n):"
read XN