Skip to content

Instantly share code, notes, and snippets.

View lukassup's full-sized avatar
🍕

Lukas Šupienis lukassup

🍕
View GitHub Profile
@lukassup
lukassup / steamdl.md
Last active November 9, 2021 11:29
Steam download

Download a Steam game

  • You need to know the APP_ID, e.g. find it in the Steam store URL.

  • You need to own the game on your account.

  • This downloads Windows version of the game, which is handy to play games with no MacOS/Linux native support on source ports (e.g. vkquake, gzdoom, raze). You can change +@sSteamCmdForcePlatformType to linux or macos if you like

  • Install steamcmd (MacOS):

brew install --cask steamcmd

Rally benchmark - control host

$ esrally race --distribution-version=7.15.0 --track=geopoint
|                                                         Metric |          Task |       Value |   Unit |
|---------------------------------------------------------------:|--------------:|------------:|-------:|
|                     Cumulative indexing time of primary shards |               |      16.705 |    min |
#!/usr/bin/env ruby
# vim: set ft=ruby:
# frozen_string_literal: true
require "bundler/setup"
require "dry/cli"
module ZX
module CLI
class SudoCommand < Dry::CLI::Command
@lukassup
lukassup / demo.rb
Created April 20, 2021 14:10
Shooting oneself in the foot using Ruby, pt1
#!/usr/bin/env ruby
current = 'Silver'
if current = 'Gold'
# ^ oh no, a mistake! should've been ==
puts 'Yay! Found gold'
else
puts "#{current} is not gold"
end
#!/usr/bin/env python3
from time import sleep
from tasks import add
result = add.delay(4,4)
sleep(0.1) # wait 0.1s
result.ready()
print(result.get())
#!/usr/bin/env python3
from time import sleep
from tasks import add
result = add.delay(4,4)
sleep(0.1) # wait 0.1s
result.ready()
print(result.get())
#!/bin/sh
##
# H.265 (HEVC) codec using NVidia hardware accelleration
#
#ffmpeg \
# -y \
# -vsync 0 \
# -hwaccel cuda -hwaccel_output_format cuda \
# -c:v hevc_cuvid \
@lukassup
lukassup / docker-compose.yml
Last active April 21, 2020 11:23
Vault PostgreSQL secret engine config
---
version: '2'
volumes:
vault:
networks:
vault:
services:
@lukassup
lukassup / docker-compose.yml
Created June 10, 2019 21:55
Docker Compose virtual development environment
---
version: '2.1'
networks:
app-net:
volumes:
db-data:
lib-data:
FROM golang:1.10 as builder
RUN apt-get update && apt-get install -y rsync
WORKDIR /go/src/k8s.io/kubernetes
ARG KUBE_VERSION=v1.10.1
ENV KUBE_VERSION=${KUBE_VERSION}
RUN git clone --depth=1 --branch="${KUBE_VERSION}" https://github.com/kubernetes/kubernetes.git .