Skip to content

Instantly share code, notes, and snippets.

View tpro's full-sized avatar

Tomasz Proć tpro

View GitHub Profile
@tpro
tpro / rearct-native-app-in-wsl2.md
Created March 28, 2023 07:10 — forked from bergmannjg/rearct-native-app-in-wsl2.md
Building a react native app in WSL2
@tpro
tpro / main.tf
Created April 15, 2022 17:50 — forked from pedrozan/main.tf
Reading secrets from AWS with aws_secretsmanager_secret_version
data "aws_secretsmanager_secret_version" "creds" {
# Here goes the name you gave to your secret
secret_id = "db-creds"
}
# Decode from json
locals {
db_creds = jsondecode(
data.aws_secretsmanager_secret_version.creds.secret_string
)
@tpro
tpro / paswitch.sh
Created November 28, 2020 13:39 — forked from tomjnixon/paswitch.sh
PulseAudio output switcher script
#!/bin/bash
# Script to switch all programs to a specific sink. Why this isn't easy, i
# don't know.
# This script takes a single argument, the sink name, index, or alias (defined
# below).
# To make this work, you will need to:
# - In /etc/pulse/default.pa:
@tpro
tpro / b.rb
Created March 8, 2020 17:37 — forked from jteneycke/b.rb
b - browse Chrome bookmarks with fzf
#!/usr/bin/env bash
# vim: set filetype=ruby:
# b - browse Chrome bookmarks with fzf
/usr/bin/ruby -x "$0" |
fzf-tmux -u 30% --ansi --multi --no-hscroll --tiebreak=begin |
awk 'BEGIN { FS = "\t" } { print $2 }' |
xargs xdg-open
exit $?

Keybase proof

I hereby claim:

  • I am tpro on github.
  • I am tpro (https://keybase.io/tpro) on keybase.
  • I have a public key ASA1NFJqOF79Ilba023VLSouOgpcAIbCK8SMXpHLgpUtpQo

To claim this, I am signing this object:

@tpro
tpro / setup.md
Created October 26, 2017 23:48 — forked from lazypower/setup.md
Run Minikube in LXD

Running Minikube via LXD

I make some assumptions, and make no claims in how well supported this is or ever will be. I wanted to avoid using VMs because i've been working in containers for the last half decade. It made sense to just skip the middle man and use a machine type container system to run my minikube workloads.

Why not juju?

Simply put, Juju does a fantastic job; but to stay objective I wanted to achieve minikube in LXD as a functional alternative to juju deploy kubernetes-core, or using KVM/VirtualBox in this solution.

@tpro
tpro / ToastNotification_Windows10.ps1
Created September 6, 2017 06:16 — forked from altrive/ToastNotification_Windows10.ps1
Windows 10 toast notification sample
$ErrorActionPreference = "Stop"
$notificationTitle = "Notification: " + [DateTime]::Now.ToShortTimeString()
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null
$template = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastText01)
#Convert to .NET type for XML manipuration
$toastXml = [xml] $template.GetXml()
$toastXml.GetElementsByTagName("text").AppendChild($toastXml.CreateTextNode($notificationTitle)) > $null
sudo apt-get update
sudo apt-get install python-virtualenv
sudo apt-get install python-dev
sudo apt-get install postgresql
sudo apt-get install postgresql-server-dev-9.3
sudo apt-get install redis-server
sudo -u postgres createuser -s sentry
sudo -u postgres psql -c "alter user sentry with password 'sentry';"
@tpro
tpro / nginx.conf
Last active November 23, 2015 12:21 — forked from markjaquith/nginx.conf
upstream phpfpm {
server unix:/var/run/php5-fpm.sock;
}
upstream hhvm {
server unix:/var/run/hhvm/hhvm.sock;
}
# SSL
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;