Skip to content

Instantly share code, notes, and snippets.

@tomaszkubacki
tomaszkubacki / passclip
Created July 22, 2023 09:46
How to copy pass (passwordstore.org) result to clipbaord
#!/usr/bin/env bash
pass $1 | xclip -sel clip
@tomaszkubacki
tomaszkubacki / fix_touchoad_dell_latitude_5480.sh
Created July 11, 2023 06:36
Fix touchpad being frozen after wake up on Dell Latitude 5480 Ubuntu 23.04
#!/bin/sh
sudo /sbin/rmmod i2c_hid_acpi
sudo /sbin/modprobe i2c_hid_acpi
@tomaszkubacki
tomaszkubacki / docker-compose.yml
Created October 18, 2022 03:28
Simple Kafka test environment with AKHQ gui ready toconnect from localhost
version: "3"
services:
zookeeper:
image: 'bitnami/zookeeper:latest'
restart: always
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
@tomaszkubacki
tomaszkubacki / docker-compose.yml
Created October 4, 2022 17:46
live coding env linuxserver.io
version: "2.1"
services:
code-server:
image: lscr.io/linuxserver/code-server:latest
container_name: code-server
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Warsaw
- PASSWORD=MY_SECRET_PASSWORD
@tomaszkubacki
tomaszkubacki / fortivpn.sh
Created September 4, 2022 08:29
fortivpn config to add routes on start
#!/bin/sh -e
# create executable file at /etc/ppp/ip-up.d/openfortivpn (any name is allow ed, but do not end with .sh)
# pass routes to add via pppd-ipparam
# eg. put this into your openfortivpn config file:
# set-routes=0
# pppd-ipparam=192.168.77.209 192.168.77.233 192.168.77.205
logger "forticlient connection is up $PPP_IFACE connection ip routes: ${6}"
IPS="${6}"
@tomaszkubacki
tomaszkubacki / bashrc
Created March 26, 2020 13:04
xmodmap Remap Logitech mx keys DE version right control and right alt and left win with left alt
setxkbmap -option altwin:swap_lalt_lwin
xmodmap -e "clear mod4" && xmodmap -e "add mod4 = Super_L"
xmodmap -e "keycode 134 = ISO_Level3_Shift"
xmodmap -e "keycode 108 = Control_R"
xmodmap -e "remove Control = Control_R"
xmodmap -e "add Control = Control_R"
@tomaszkubacki
tomaszkubacki / post-receive.sh
Last active November 29, 2019 19:28
git hook for deploy
#!/bin/bash
TARGET="/home/git/intermediate_dir_for_build"
BUILD_DIR="$TARGET/build"
DEPLOY_DIR="/var/www/deploy_site_name"
GIT_DIR="/home/git/repo_name.git"
BRANCH="master"
REF_MATCH="refs/tags/"
umask 002
while read oldrev newrev ref
do
name: myproj
description: myproj ui project
version: 0.0.1
environment:
sdk: '>=1.23.0 <2.0.0'
dependencies:
angular2: ^3.1.0
dart_to_js_script_rewriter: ^1.0.1
logging: any
chartjs: ^0.4.0
@tomaszkubacki
tomaszkubacki / combobox.dart
Created May 4, 2017 13:58
combobox in angulardart
import 'dart:html';
import 'package:angular2/angular2.dart';
import 'package:logging/logging.dart';
@Component(selector: 'combobox-control',
template: """
<select [(ngModel)]="selectedValue" >
<option *ngFor="let obj of source" [ngValue]="obj">{{displayGetter(obj)}}</option>
@tomaszkubacki
tomaszkubacki / logOverlay.dart
Created December 8, 2016 15:34
nice log overlay in Dartlang
Element logOverlay() {
DivElement div = new DivElement()
..style.height = "24px"
..style.width = "100%"
..style.position = "fixed"
..style.zIndex = "1"
..style.left = "0"
..style.bottom = "0"
..style.backgroundColor = "rgba(0,0,0, 0.9)"