Skip to content

Instantly share code, notes, and snippets.

View juanpagfe's full-sized avatar

Juan Pablo Garcia juanpagfe

View GitHub Profile
@juanpagfe
juanpagfe / ips
Created January 9, 2025 14:48
Bash script to get the private and public IP address per network interface
#!/bin/bash
# A command-line tool to get the private and public ip address per network
# interface for Mac and Linux.
#
# Dependencies:
# - MacOS: ifconfig
# - Linux: ip
#
# Installation:
@juanpagfe
juanpagfe / copy
Last active December 19, 2024 15:47
Bash script to implement copy to clipboard for macOS and Linux
#!/bin/bash
# A command-line tool to simplify the copy of text generated in the terminal to
# the clipboard
#
# Dependencies:
# - MacOS: pbcopy
# - Linux: xclip
#
# Installation:
@juanpagfe
juanpagfe / schat.py
Created May 26, 2020 12:26
Simple chat over serial
import argparse
import os
import serial
import thread
def file_path(string):
if os.path.exists(string):
return string
else:
raise Exception('%s does not exists' % string)
@juanpagfe
juanpagfe / setup-deploy-agent.sh
Last active March 22, 2018 16:59
EC2 User Data script to install CodeDeploy agent
#!/bin/bash
sudo yum install -y aws-cli
cd /home/ec2-user/
aws s3 cp 's3://aws-codedeploy-us-east-1/latest/codedeploy-agent.noarch.rpm' . --region us-east-1
sudo yum -y install codedeploy-agent.noarch.rpm