Skip to content

Instantly share code, notes, and snippets.

View fosron's full-sized avatar
💻
Hard at work

Tautvydas fosron

💻
Hard at work
View GitHub Profile
@fosron
fosron / eafcpacks.js
Created January 23, 2024 14:10
get all packs in chrome dev tools
// Create an object to hold the titles and their counts
let titleCounts = {};
// Select all elements with the class 'ut-store-pack-details-view'
let packs = document.querySelectorAll('.ut-store-pack-details-view');
// Iterate over the NodeList
packs.forEach((pack) => {
// Determine if the pack is tradeable or untradeable
let tradeStatus = pack.classList.contains('is-tradeable') ? 'Tradeable' : 'Untradeable';
@fosron
fosron / stream_deck_monitor.md
Created May 5, 2023 09:19
Stream Deck MK2 Monitor

To create an auto-run macOS service that monitors the connection of your Stream Deck MK.2 and runs the Stream Deck app when the device is connected, you can use a launchd user agent. Here's how to set it up:

  1. Create a new script monitor_stream_deck.sh in your home directory:
nano ~/monitor_stream_deck.sh
  1. Paste the following script into the file:
@fosron
fosron / streamdeck_monitor.sh
Last active May 5, 2023 08:51
streamdeck_monitor.sh
#!/bin/bash
# Replace this with the correct path to the Stream Deck app
STREAMDECK_APP_PATH="/Applications/Stream Deck.app"
# Vendor and product ID for Stream Deck (Elgato Stream Deck MK2)
VENDOR_ID="0fd9"
PRODUCT_ID="0080"
# Function to check if the Stream Deck is connected
@fosron
fosron / killrunningboardd.sh
Last active January 18, 2022 16:43
killrunningboardd.sh
#!/bin/bash
while true;
do
for pid in $(ps -ef | awk '/runningboardd/ {print $2}'); do pkill -9 $pid; done
sleep 10
done
<?php
class MailsterMailerSend {
private $plugin_path;
private $plugin_url;
/**
*
*/
dietpi@DietPi:/etc/modprobe.d$ sudo dietpi-config
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 0 with SSID "Tautwifi 5GHz"
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 1 with SSID ""
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 2 with SSID ""
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 3 with SSID ""
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 4 with SSID ""
[ SUB1 ] DietPi-Services > stop
[ OK ] DietPi-Services | stop : cron
[ OK ] DietPi-Services | stop : docker
[ OK ] DietPi-Services | stop : rpimonitor
@fosron
fosron / .php_cs.laravel.php
Created April 14, 2020 09:34 — forked from laravel-shift/.php-cs-fixer.php
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => ['=>' => null]
@fosron
fosron / keybase.md
Created December 10, 2019 14:55
keybase.md

Keybase proof

I hereby claim:

  • I am fosron on github.
  • I am fosron (https://keybase.io/fosron) on keybase.
  • I have a public key ASANGqdHxybtaKabkC7fVBK-O8Fg_eAm8nmjqg15Id7MYQo

To claim this, I am signing this object:

@fosron
fosron / GPG and git on macOS.md
Created December 10, 2019 14:47 — forked from danieleggert/GPG and git on macOS.md
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@fosron
fosron / SupervisordInstallationUbuntu12.04LTS.md
Last active February 9, 2018 16:13 — forked from alexhayes/SupervisordInstallationUbuntu12.04LTS.md
Supervisord Installation on Ubuntu 12.04 LTS

Supervisord Installation on Ubutnu 12.04 LTS

There are a number of solutions for installing supervisord and automatically running it on Ubuntu - this is what worked for me (on multiple installations...).

Installation

Quick & Easy

sudo bash &lt; &lt;(curl https://gist.githubusercontent.com/fosron/6a71c4dbb20eed463d764aa4c5799b22/raw/full-install.sh)