Skip to content

Instantly share code, notes, and snippets.

View jaimemrjm's full-sized avatar

Jaime Martín jaimemrjm

View GitHub Profile
@xirixiz
xirixiz / pihole-macvlan-synology-docker.txt
Last active June 10, 2024 08:44
Add a PiHole instance on a macvlan enabled Docker network (Synology eth0 example)
#!/bin/bash
# NAS IP: 192.168.1.10 in this example
# DHCP scope reservation for macvlan: 192.168.1.210/28 (Details below)
## Network: 192.168.1.210/28
## HostMin: 192.168.1.211
## HostMax: 192.168.1.224
## Hosts/Net: 14
# Create a Synology macvlan0 bridge network attached to the physical eth0, and add the ip range scope (sudo)
@ohnotnow
ohnotnow / autostart.sh
Created December 2, 2017 15:47
Disabling wifi power management on rpi3/libreelec
# from : https://forum.libreelec.tv/thread/5074-wifi-issues-on-rpi-3-poor-speed-and-latency-solution/#codeLine_1_3e8919
# first install the 'network tools' add-on from the kodi repository then create a /storage/.config/autostart.sh file with
# this as the contents.
# then reboot the pi. runnning 'iwconfig' should now show the power-management as being off.
/storage/.kodi/addons/virtual.network-tools/bin/iw wlan0 set power_save off
@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active June 11, 2024 10:46
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <sanderthedragon@zoho.com>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in
@mda590
mda590 / boto3_listinstances_example.py
Last active July 1, 2024 09:05
Example using boto3 to list running EC2 instances
import boto3
ec2 = boto3.resource('ec2')
def lambda_handler(event, context):
# create filter for instances in running state
filters = [
{
'Name': 'instance-state-name',
'Values': ['running']
@ableasdale
ableasdale / boto3-list-instances.py
Created July 16, 2016 09:57
Using Boto 3 to list out AWS EC2 instance information
import boto3
from termcolor import colored
ec2 = boto3.resource('ec2')
for i in ec2.instances.all():
print("Id: {0}\tState: {1}\tLaunched: {2}\tRoot Device Name: {3}".format(
colored(i.id, 'cyan'),
colored(i.state['Name'], 'green'),
@phieber
phieber / makeRpi.sh
Created February 13, 2016 10:15
Script which creates new builds for the RaspberryPi. Those builds are pushed to https://rpi.pa.trickhieber.de .
#!/bin/bash
#
# Author: Patrick Hieber - github.com/phieber
#
# This work is licensed under a GNU General Public License (GPLv3) Version 3.0 http://www.gnu.org/licenses/gpl-3.0.html
cleanup() {
rm -rf /tmp/Gentoo* /tmp/root.tar.xz /tmp/boot.tar.xz /tmp/*.json /tmp/partition_setup.sh /tmp/rpi*
find /var/www/de/trickhieber/pa/rpi/htdocs/geNtOOBS* -mtime +1 -exec rm {} \;
@rajbharath
rajbharath / Postman UUID
Created June 26, 2015 13:11
How to create UUID in postman rest client
{{$guid}}
the above variable will generate UUID in Postman Rest Client
Sample request is below
========================
{
"user":{
"id":"{{$guid}}"
}
@rmcfrazier
rmcfrazier / rsync.xml
Created July 3, 2012 21:40
Ant builder to rsync on save in eclipse
<?xml version="1.0" encoding="UTF-8"?>
<project name="Rsync On Save" basedir="." default="rsync">
<description>Builder for eclipse to rsync on save for OSX.</description>
<!-- local source directory for rsync (read from this directory) -->
<property name="rsync.source.dir" value="${basedir}"/>
<!-- remote rsync host -->
<property name="rsync.destination.host" value="remote.example.com"/>
@davidnunez
davidnunez / gist:1404789
Created November 29, 2011 13:20
list all installed packages in android adb shell
pm list packages -f