Skip to content

Instantly share code, notes, and snippets.

View afelicioni's full-sized avatar
👔
Focused on @aws ☁️

Alessio Felicioni afelicioni

👔
Focused on @aws ☁️
View GitHub Profile
@afelicioni
afelicioni / public-ip.sh
Created April 4, 2021 20:57
get public ip using curl, awk leveraging cloudflare trace endpoint
#!/bin/bash
IP=$(curl --location --request GET 'https://www.cloudflare.com/cdn-cgi/trace' 2>/dev/null | awk 'BEGIN { FS = "=" } ; $1 == "ip" { print $2 }')
echo $IP
@MoonTahoe
MoonTahoe / upload.yaml
Last active April 16, 2024 21:40
Github Action to build iOS app with expo and upload to testflight
# Just place this file in your repo under the .github/workflows folder.
# You set all of the secrets in the setting of the repo
name: Deploy to Testflight
# When a pull request is closed...
# This is because this action commits back to the repository
# so setting this on a push would cause an infinite loop of commits
# unless you pragmatically check the contents of the repo or something
@kernelkaribou
kernelkaribou / cloudflare_dyndns_synology
Last active May 14, 2024 21:31
Used to regularly update a Cloudflare DNS record from your Synology NAS.
#!/bin/bash
####################################################################################
# Author: Kernelkaribou@github
#
# Purpose: Update a DNS record hosted at Cloudflare to represent network public IP.
# Based upon Cloudflare API v4
#
# Additional Notes: This will send notifications to Synology log center.
# Comment out writeLog lines if not desired or on Synology platform
@wkrea
wkrea / cheatsheets.md
Created February 27, 2020 19:09 — forked from FlorianHeigl/cheatsheets.md
Printable Cheat Sheets for Software

A collection of links to useful cheat sheets.

Only what's properly printable can get in. It should also be small enough to fit on a few pages.

Pleae contribute any you remember you've seen and liked. It would be wonderful if we can get these to be something more commonly made.

Search Engines

https://www.alienvault.com/blog-content/GoogleHackingCheatSheet.pdf (nicely put together!)

@pirate
pirate / dns.sh
Last active December 28, 2023 15:00
Dynamic DNS updater script for DigitalOcean and CloudFlare (using bash, curl, and jq)
#!/usr/bin/env bash
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
SCRIPTNAME="$0"
HELP_TEXT="
@azmankudus
azmankudus / cloudflare-dynamicip.sh
Created February 14, 2019 02:27
Cloudflare Dynamic IP script
#!/bin/bash
# Bash script to update Cloudflare DNS content with dynamic IP via CloudFlare API v4. Usually Type A and AAAA.
# Public IP (IPv4/v6) retrieved from ifconfig.co.
# Supporting program used : curl, echo, grep, egrep, head, wc, sed, tr
#
# EMAIL= your account's email
# API_KEY= your global API key
# ZONE_NAME= set target zone name. One zone per script.
# DNS_NAMES= set full DNS names (domain/subdomain) configured in the zone. Separate by space if more than one.
@AnnoyingTechnology
AnnoyingTechnology / Apple's SuperDrive tweak for use with Linux.md
Last active March 6, 2024 22:53
Make Apple's USB SuperDrive work on Linux

I was ready to throw it away, I opened it up and didn't find anything wrong with it. After a quick Google Search, turns out Apple fucked up their users (again) and locked this drive to only one laptop : the MacBook Air.

Bellow is the tweak (found online) to make it usable on Linux

# Debian/linux only - Linux SCSI generic driver
sudo apt install sg3-utils -y
{
"type": "APL",
"version": "1.0",
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"layouts": {},
"mainTemplate": {
"parameters": [
/* eslint-disable func-names */
/* eslint-disable no-console */
const Alexa = require('ask-sdk');
const LaunchRequestHandler = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'LaunchRequest';
},
handle(handlerInput) {
@aondio
aondio / install_ask_cli.sh
Created October 12, 2018 16:28
script to install ask-cli
sudo apt-get update
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install --lts
npm install -g ask-cli