Skip to content

Instantly share code, notes, and snippets.

View D3strukt0r's full-sized avatar
🎯
Focusing on school

Manuele D3strukt0r

🎯
Focusing on school
View GitHub Profile
// ==UserScript==
// @name BigCommerce Auto Puller
// @description Automaticall trigger all grabs on BigCommerce
// @namespace https://www.d3strukt0r.me
// @version 0.0.1
// @author D3strukt0r
// @homepageURL https://github.com/D3strukt0r/BigCommerce-Auto-Grabber
// @icon https://icons.duckduckgo.com/ip2/bcm78789.com.ico
// @updateURL https://github.com/D3strukt0r/BigCommerce-Auto-Grabber/releases/latest/download/bigcommerce-auto-grabber.cjs.user.js
// @downloadURL https://github.com/D3strukt0r/BigCommerce-Auto-Grabber/releases/latest/download/bigcommerce-auto-grabber.cjs.user.js
DOCKER_NAME=docker4localdev
DOCKER_BASE_URL=docker.localdev
@D3strukt0r
D3strukt0r / ddclient$ddclient.conf
Last active November 21, 2021 23:51
Server config
######################################################################
##
## Define default global variables with lines like:
## var=value [, var=value]*
## These values will be used for each following host unless overridden
## with a local variable definition.
##
## Define local variables for one or more hosts with:
## var=value [, var=value]* host.and.domain[,host2.and.domain...]
##
@D3strukt0r
D3strukt0r / delete-all-deployments.sh
Last active September 20, 2020 18:09
Inactives and deletes all deployments on a repository
#!/bin/bash
REPO=
TOKEN=
# https://starkandwayne.com/blog/bash-for-loop-over-json-array-using-jq/
for deployment in $(curl https://api.github.com/repos/$REPO/deployments | jq -r '.[] | @base64'); do
DEPLOYMENT_ID=$(echo "$deployment" | base64 --decode | jq -r '.id')
echo "$DEPLOYMENT_ID"
curl "https://api.github.com/repos/$REPO/deployments/$DEPLOYMENT_ID/statuses" \
#!/usr/bin/env bash
# SymfonyCloud CLI installer.
set -euo pipefail
CLI_LATEST_VERSION_URL="https://get.symfony.com/cli/LATEST"
CLI_CONFIG_DIR=".symfony"
CLI_EXECUTABLE="symfony"
CLI_TMP_NAME="$CLI_EXECUTABLE-"`date +"%s"`
CLI_NAME="Symfony CLI"
@D3strukt0r
D3strukt0r / cloudflare-ddns.sh
Created May 7, 2020 18:34
Automatically update your CloudFlare DNS record to the IP, Dynamic DNS for Cloudflare
#!/usr/bin/env bash
# The zone ID of the domain
CF_ZONE_ID=
# The email of the user and the global api key
CF_USER_EMAIL=
CF_GLOBAL_API_KEY=
# A generated API key with the permission "Zone.DNS"

BACKUP DATA FOLDER /opt

for d in */; do
    dir=${d%/}
@D3strukt0r
D3strukt0r / start-spigot.sh
Created March 8, 2020 23:38
Download a Spigot version and run
#!/bin/bash
# Verify versions
echo "[ ] Check if Java is available..."
if java -version 2>&1 >/dev/null | grep -q "openjdk version" ; then
echo -e "\e[1A[ \e[32mOK\e[39m ]"
elif java -version 2>&1 >/dev/null | grep -q "java version"; then
echo -e "\e[1A[ \e[32mOK\e[39m ]"
else
echo -e "\e[1A[\e[31mFAIL\e[39m]" >&2
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Scanner;
public class Shop {
public static void main(String[] args) {
// Create the products list
ArrayList<Product> productList = new ArrayList<>();
// Create and add product 1