Skip to content

Instantly share code, notes, and snippets.

View kajov's full-sized avatar
🏠
Working from home

Karolis Jovaisas kajov

🏠
Working from home
View GitHub Profile
@cmendible
cmendible / kubectl_ubuntu_wsl.sh
Created November 16, 2019 22:02
Install kubectl on ubuntu (WSL) and use kubectl config from Windows
#!/bin/bash
# Receives your Windows username as only parameter.
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
windowsUser=$1
@dnburgess
dnburgess / gist:b0562675f27d9ab44fa6fc17cbc48ee7
Created March 1, 2021 00:58
Setup Google OAuth for Portainer Remote Access
You're going to need a Google Developer's Account: https://console.developers.google.com/
https://console.cloud.google.com/projectselector2/home/dashboard?authuser=2&organizationId=0&supportedpurview=project
You'll need to know what you want your Portainer URL to be.
Create a Project
Enter a Project Name and click "Create"
APIs & Services
@Sgiath
Sgiath / compress.sh
Last active September 23, 2021 21:44
Foundry Nginx config
#!/usr/bin/env bash
# ==================== EDIT THIS ================================================
core_files="/home/foundry/core"
data_files="/home/foundry/data"
# ===============================================================================
# Green done message
msg_done() {
printf "%sDone%s\n" "$(tput bold)$(tput setaf 2)" "$(tput sgr0)"
@davidedmundson
davidedmundson / PlasmaNested.sh
Last active July 15, 2024 02:34
Run plasma from within gamescope
#!/bin/sh
# Remove the performance overlay, it meddles with some tasks
unset LD_PRELOAD
## Shadow kwin_wayland_wrapper so that we can pass args to kwin wrapper
## whilst being launched by plasma-session
mkdir $XDG_RUNTIME_DIR/nested_plasma -p
cat <<EOF > $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper
#!/bin/sh
@mathix420
mathix420 / medium.user.js
Last active July 26, 2024 15:40
Bypass Medium Paywall - Working late 2023 - Greasy Fork, Violentmonkey, Tampermonkey - Click the RAW button to install
// ==UserScript==
// @name Medium Paywall Bypass
// @namespace Violentmonkey Scripts
// @run-at document-start
// @match *://*.medium.com/*
// @match *://medium.com/*
// @match *://*/*
// @grant none
// @version 2.4
// @inject-into content
@nico-i
nico-i / drink_water_cron.sh
Last active March 19, 2024 10:32
Display an intrusive prompt to drink water every 15min using a cron job
# - OSX / MacOS -
# Cron Job
*/15 * * * * osascript -e 'tell application (path to frontmost application as text) to display dialog "Drink some water. :]" buttons {"OK"}'
# Automatically add cron job to existing cron jobs
(crontab -l ; echo "*/15 * * * * osascript -e 'tell application (path to frontmost application as text) to display dialog \"Drink some water. :]\" buttons {\"OK\"}'") | crontab -
# as su
(sudo crontab -l ; echo "*/15 * * * * osascript -e 'tell application (path to frontmost application as text) to display dialog \"Drink some water. :]\" buttons {\"OK\"}'") | sudo crontab -
# - Fedora Linux -
# Cron Job