Skip to content

Instantly share code, notes, and snippets.

View nikteg's full-sized avatar

Niklas nikteg

  • Stena Line Scandinavia
  • Gothenburg, Västra Götaland, Sweden
View GitHub Profile
@nikteg
nikteg / update_portainer.sh
Created May 24, 2025 09:53
Simple script to update portainer
#!/bin/bash
set -euo pipefail
# Check if running as root
if [ "$EUID" -ne 0 ]; then
echo "This script requires sudo privileges. Re-running with sudo..."
exec sudo "$0" "$@"
exit
fi
[
{
"button": "button1",
"modifiers": ["super"],
"press_command": "drag_select",
"command": "goto_definition"
},
{
"button": "button1",
"count": 1,
{
"ignored_packages": ["Vintage"],
"shift_tab_unindent": true,
"translate_tabs_to_spaces": true,
"tab_size": 2
}
@nikteg
nikteg / Default (OSX).sublime-keymap
Last active February 6, 2022 11:38
Some IntelliJ IDEA keybinds for Sublime Text
[
{ "keys": ["super+d"], "command": "duplicate_line" },
{ "keys": ["alt+up"], "command": "expand_selection", "args": { "to": "smart" } },
{ "keys": ["ctrl+g"], "command": "find_under_expand" },
{ "keys": ["super+shift+a"], "command": "show_overlay", "args": { "overlay": "command_palette" } },
{ "keys": ["shift+alt+up"], "command": "swap_line_up" },
{ "keys": ["shift+alt+down"], "command": "swap_line_down" }
]
@nikteg
nikteg / goldenhour.1h.py
Last active March 15, 2021 16:13
Bitbar Golden Hour
#!/usr/bin/env LC_ALL=en_US.UTF-8 /usr/local/bin/python3
#
# <bitbar.title>Golden hour</bitbar.title>
# <bitbar.version>v0.3</bitbar.version>
# <bitbar.author>nikteg</bitbar.author>
# <bitbar.author.github>nikteg</bitbar.author.github>
# <bitbar.desc></bitbar.desc>
# <bitbar.image></bitbar.image>
# <bitbar.dependencies>python</bitbar.dependencies>
@nikteg
nikteg / ctrltab.js
Created June 19, 2020 09:04
Ctrl+Tab MRU
// https://chrome.google.com/webstore/detail/clut-cycle-last-used-tabs/cobieddmkhhnbeldhncnfcgcaccmehgn
// In console on extension keyboard shortcuts
chrome.developerPrivate.updateExtensionCommand({
extensionId: "cobieddmkhhnbeldhncnfcgcaccmehgn",
commandName: "alt_switch_fast",
keybinding: "Ctrl+Tab"
});
@nikteg
nikteg / style.css
Created June 14, 2020 08:42
Hacker News Readable
@-moz-document url-prefix("https://news.ycombinator.com/") {
/* reset */
body, td, table, input, textarea, .pagetop, * {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-weight: 400;
-webkit-font-smoothing: antialiased;
}
body {
background: #fafafa;
Unlimited scrollback
Preferences > Advanced > General: Allow window to resize smoothly
Colorscheme: IR_Black
Theme: Minimal
Dimming on text only
Show tab bar even if there's only one tab
Do not stretch tabs to fill tab bar
Do not show window number in title bar
name: Publish
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
@nikteg
nikteg / .zprofile
Created January 11, 2019 13:15
.zprofile
[[ -e ~/.profile ]] && emulate sh -c 'source ~/.profile'