Skip to content

Instantly share code, notes, and snippets.

Avatar
🍕

Lukas Šupienis lukassup

🍕
View GitHub Profile
View opensource-game-engines.md
@lukassup
lukassup / steamdl.md
Last active Nov 9, 2021
Steam download
View steamdl.md

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
View control.md

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 |
View cli
#!/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 Apr 20, 2021
Shooting oneself in the foot using Ruby, pt1
View demo.rb
#!/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
View run_task.py
#!/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())
View run_task.py
#!/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())
View ffmpeg-timelapse-x30.sh
#!/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 Apr 21, 2020
Vault PostgreSQL secret engine config
View docker-compose.yml
---
version: '2'
volumes:
vault:
networks:
vault:
services:
@lukassup
lukassup / docker-compose.yml
Created Jun 10, 2019
Docker Compose virtual development environment
View docker-compose.yml
---
version: '2.1'
networks:
app-net:
volumes:
db-data:
lib-data: