Skip to content

Instantly share code, notes, and snippets.

View axi92's full-sized avatar

axi92 axi92

  • Vienna
View GitHub Profile
@peedy2495
peedy2495 / README.md
Last active May 15, 2024 20:17
Deploy USB-devices via Network as simple and stable as possible

Deploy USB-devices via Network as simple and stable as possible

Features:

  • auto-export on host when a defined usb-device has been plugged
  • auto-attachment on client when a disappeared remote-device is available, again.

Files Included:

README.md
usbip-export@.service

@mzpqnxow
mzpqnxow / DiscordSOCKS5.md
Created August 24, 2020 04:45
Use SOCKS5 proxy with Discord on Linux

Using SOCKS5 Proxy With Discord on Linux

You may only need the environment or the command-line parameter to force Discord to use a proxy. It doesn't hurt to use both

So if you're behind a firewall and need to go through, e.g. an SSH dynamic port forward (a SOCKS5 channel inside an SSH session) you can use the following:

$ nohup ssh -D1080 proxy_server &
$ http_proxy=socks5://127.0.0.1:1080 https_proxy=socks5://127.0.0.1:1080 /opt/Discord/Discord --proxy-server="socks5://127.0.0.1:1080"
@s3rj1k
s3rj1k / HowTo
Last active July 13, 2024 08:05
Ubuntu 20.04.3 AutoInstall
# For recent versions of Ubuntu:
- https://www.pugetsystems.com/labs/hpc/ubuntu-22-04-server-autoinstall-iso/
# Docs:
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference
- https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html
- https://discourse.ubuntu.com/t/please-test-autoinstalls-for-20-04/15250/53
# Download ISO Installer:
@ninapavlich
ninapavlich / sort.js
Last active April 19, 2024 09:02
Deep Sort Javascript Object
function sortObject(object) {
//Thanks > http://whitfin.io/sorting-object-recursively-node-jsjavascript/
if (!object) {
return object;
}
const isArray = object instanceof Array;
var sortedObj = {};
if (isArray) {
sortedObj = object.map((item) => sortObject(item));
@ujwalp1994
ujwalp1994 / BrowserStack.robot
Created July 4, 2017 14:34
Sample Test to run Robot tests on BrowserStack
*** Settings ***
Library Selenium2Library
Library Collections
Library Collections
Library String
Library BuiltIn
*** Variables ***
${SITE_URL} = https://sprint-005-origin.levi-site.com/CA/en_CA/
${SELENIUM_TIME_OUT} = 120
@up1
up1 / Hello.java
Last active January 3, 2020 20:28
Robotframework + Google Chrome headless
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setBinary("/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary");
chromeOptions.addArguments("--headless");
WebDriver Driver = new ChromeDriver(chromeOptions);
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@rponte
rponte / get-latest-tag-on-git.sh
Last active July 4, 2024 10:55
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples
mkfs.vfat -n config-2 -I /dev/sdc
mkdir -p /media/config-drive
mount /dev/sdc /media/config-drive
mkdir -p /media/config-drive/openstack/latest
cp cloud-config.yml /media/config-drive/openstack/latest/user_data
umount /media/config-drive

NOTE mkfs.vfat is provided by the dosfstools package

@soheilhy
soheilhy / nginxproxy.md
Last active May 16, 2024 08:59
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers