Skip to content

Instantly share code, notes, and snippets.

View JonMagon's full-sized avatar

Dmitry Sidorov JonMagon

View GitHub Profile
@zookee1
zookee1 / tamrieltradecentre.sh
Last active August 2, 2025 21:29
Tamriel Trade Centre Update
#!/bin/bash
REGION="eu" # eu or us
TTC="/mnt/games/SteamLibrary/steamapps/compatdata/306130/pfx/drive_c/users/steamuser/My Documents/Elder Scrolls Online/live/AddOns/TamrielTradeCentre"
ZIP="/tmp/PriceTable.zip"
wget -O $ZIP https://$REGION.tamrieltradecentre.com/download/PriceTable
unzip -o $ZIP -d "$TTC"
@wkrp
wkrp / dnstt-client-plugin
Last active October 27, 2025 14:32
Proof-of-concept Shadowsocks plugin for dnstt (DNS tunnel)
#!/bin/bash
# ss-local -s 0.0.0.1 -p 1 -l 1080 -k password --plugin dnstt-client-plugin --plugin-opts 'doh=https://doh.example/dns-query;domain=<domain>;pubkey=<pubkey>'
DNSTT_CLIENT="./dnstt-client"
unset TRANSPORT RESOLVER PUBKEY DOMAIN
IFS=";" read -a OPTIONS <<<"$SS_PLUGIN_OPTIONS"
for opt in "${OPTIONS[@]}"; do
IFS="=" read key value <<<"$opt"
@ksvbka
ksvbka / qml-executable-stdout.qml
Created March 4, 2020 07:42
Get output from stdout when execute a command
import QtQuick 2.0
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
import org.kde.plasma.core 2.0 as PlasmaCore
Item {
implicitWidth: label.implicitWidth
implicitHeight: label.implicitHeight
property string data: "?"
@noelboss
noelboss / git-deployment.md
Last active August 12, 2025 18:16
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@aras-p
aras-p / preprocessor_fun.h
Last active December 5, 2025 05:33
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,