Skip to content

Instantly share code, notes, and snippets.

View waltervargas's full-sized avatar
🎯
BioHacking(self)

Walter Vargas waltervargas

🎯
BioHacking(self)
View GitHub Profile
@waltervargas
waltervargas / aws-cf-delete-stacks.yml
Last active October 13, 2023 06:10
Ansible Playbook to Delete AWS CloudFormation Stacks in Sequence from Command Line
# Usage: ansible-playbook aws-cf-delete-stacks.yml -e '{"stacks": ["jenkins", "openvpn", "network", "iam"], "region": "us-west-2"}'
- hosts: localhost
gather_facts: no
connection: local
tasks:
- name: Delete Stacks
with_items: "{{ stacks }}"
cloudformation:
stack_name: "{{ item }}"
state: "absent"
@waltervargas
waltervargas / plugins.groovy
Created April 12, 2017 16:08
Jenkins Plugins Install
#!groovy
import jenkins.model.*
import java.util.logging.Logger
def plugins = "job-dsl git docker-custom-build-environment pipeline-stage-view github workflow-aggregator workflow-multibranch conditional-buildstep parameterized-trigger rebuild email-ext".split()
def log = Logger.getLogger("")
def instance = Jenkins.getInstance()
def updateCenter = instance.getUpdateCenter()
@waltervargas
waltervargas / docker-tcp.socket
Created April 9, 2017 18:06
Docker TCP Socket with Systemd
# File: /etc/systemd/system/docker-tcp.socket
[Unit]
Description=Docker Socket for the API
[Socket]
ListenStream=2375
BindIPv6Only=both
Service=docker.service
[Install]
@waltervargas
waltervargas / docker-gnome-builder.sh
Last active March 26, 2017 00:53
GNOME Builder running from docker
git clone https://github.com/waltervargas/docker-gnome-builder.git
cd docker-gnome-builder
sed -i "s/waltervargas/$USER/g" Dockerfile
docker build -t gnome-builder .
docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME:$HOME --name gnome-builder gnome-builder
@waltervargas
waltervargas / build.sh
Created March 25, 2017 22:42
Docker build command
docker build -t gnome-builder .
@waltervargas
waltervargas / Dockerfile
Last active March 26, 2017 00:20
Run gnome-builder from a docker container
FROM ubuntu:16.10
RUN apt-get update && apt-get install -y gnome-builder
RUN useradd waltervargas
USER waltervargas
ENV HOME /home/waltervargas
CMD /usr/bin/gnome-builder
@waltervargas
waltervargas / dell-5510-ubuntu-libinput.md
Last active July 31, 2020 10:15
Dell Precision 5510 with Ubuntu 16.04.2 and libinput to fix the mouse at times is a bit jumpy
  • Install the packages

    sudo apt-get install libinput-tools xserver-xorg-input-libinput
    
  • Identify the touchpad device with

    sudo /usr/bin/libinput-list-devices
    ...
    Device:           DLL06E5:01 06CB:7A13 Touchpad
    Kernel:           /dev/input/event16
    

Group: 8

@waltervargas
waltervargas / packer_build.sh
Created March 17, 2017 04:56
Packer Build Script for Jenkins Job AWS
#!/bin/bash
cd packer/jenkins
if [ ! -f bin/packer ]; then
wget -c https://releases.hashicorp.com/packer/0.12.3/packer_0.12.3_linux_amd64.zip
unzip -d bin packer_0.12.3_linux_amd64.zip
fi
branch=$(git rev-parse --abbrev-ref HEAD)
git_url=$(git config --get remote.origin.url)
tmpl=$(git rev-parse --show-prefix)
tmpl+=jenkins.json
@waltervargas
waltervargas / sg-self-reference.yml
Created March 16, 2017 23:24
CloudFormation SG Self-Referenced
---
Description: Create a VPC with a SG which references itself
AWSTemplateFormatVersion: '2010-09-09'
Resources:
vpc:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 172.16.0.0/16
EnableDnsSupport: false
EnableDnsHostnames: false
@waltervargas
waltervargas / webui.py
Created March 9, 2017 19:47
Python version for webui.py used by dockercoins -> https://github.com/jpetazzo/dockercoins
from flask import Flask
from flask import jsonify
from redis import Redis
import time
app = Flask(__name__, static_url_path="")
redis = Redis('redis')
@app.route('/')
def root():