Skip to content

Instantly share code, notes, and snippets.

λ ~/ lutris
2020-05-03 20:50:59,657: Running Lutris 0.5.6
2020-05-03 20:50:59,657: Using Intel Open Source Technology Center
2020-05-03 20:50:59,657: Running Mesa driver 20.0.6 on Mesa DRI Intel(R) HD Graphics 4400 (HSW GT2) (0xa16)
2020-05-03 20:50:59,658: GPU: 8086:0A16 17AA:220C using i915 drivers
INTEL-MESA: warning: Haswell Vulkan support is incomplete
2020-05-03 20:50:59,670: Vulkan is supported
2020-05-03 20:50:59,671: Updating DXVK versions
2020-05-03 20:50:59,861: Connected to lutris.net as oster
lutris-wrapper: Alan Wake
>> attributes_keys
{:country_ids=>:country_id, :group_type_ids=>:group_type_id, :region_ids=>:region_id, :city_ids=>:city_id}
(byebug) >> keys
[:country_ids, :city_ids]
(byebug) >> attributes_keys.slice(*keys)
{:country_ids=>:country_id, :city_ids=>:city_id}
(byebug) >> attributes_keys.slice(*keys).values
[:country_id, :city_id]
(byebug) >> attributes_keys.slice(*keys).values.zip(p)
[[:country_id, 1001], [:city_id, 1213]]
/Users/denisoster/.cargo/bin/cargo run --color=always --package iwt --bin iwt
Compiling iwt v0.1.0 (/Users/denisoster/Projects/rust/iwt)
error[E0382]: borrow of moved value: `line`
--> src/main.rs:18:41
|
14 | let line = line.unwrap(); // Ignore errors.
| ---- move occurs because `line` has type `std::string::String`, which does not implement the `Copy` trait
...
18 | fs::copy(line, format!("to/{}", line));
| ---- value moved here ^^^^ value borrowed here after move
@denisoster
denisoster / divos-hack.c
Last active June 11, 2022 00:52
Arch hack Divinity Original Sin Enhanced Edition, GOG version
/*
* LD_PRELOAD shim which applies two patches necesary to get the game
* Divinity: Original Sin Enhanded Edition for Linux to work with Mesa (12+)
*
* Build with: gcc -s -O2 -shared -fPIC -o divos-hack.{so,c} -ldl
*/
/* for RTLD_NEXT */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
SELECT nspname || '.' || relname AS "relation",
pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE nspname NOT IN ('pg_catalog', 'information_schema')
AND C.relkind <> 'i'
AND nspname !~ '^pg_toast'
ORDER BY pg_total_relation_size(C.oid) DESC
LIMIT 5;
use std::fs::File;
use std::io::Read;
use regex::Regex;
pub fn status(port: Option<u16>) -> () {
tool_versions();
}
pub fn start(port: Option<u16>) -> () {
println!("{ }", tool_versions());
current directory: /Users/denisoster/.asdf/installs/ruby/truffleruby-19.3.0/lib/gems/gems/therubyracer-0.12.3/ext/v8
/Users/denisoster/.asdf/installs/ruby/truffleruby-19.3.0/bin/truffleruby -I /Users/denisoster/.asdf/installs/ruby/truffleruby-19.3.0/lib/mri -r ./siteconf20200227-67518-189d4or.rb extconf.rb
checking for -lpthread... yes
checking for -lobjc... yes
creating Makefile
current directory: /Users/denisoster/.asdf/installs/ruby/truffleruby-19.3.0/lib/gems/gems/therubyracer-0.12.3/ext/v8
make "DESTDIR=" clean
current directory: /Users/denisoster/.asdf/installs/ruby/truffleruby-19.3.0/lib/gems/gems/therubyracer-0.12.3/ext/v8
@denisoster
denisoster / Dockerfile
Created February 11, 2020 09:11 — forked from jmpinit/Dockerfile
Example of cross-compiling Rust for ARMv7.
FROM ubuntu
MAINTAINER Owen Trueblood
# general dependencies
RUN apt-get install -y curl
# install target toolchain
RUN apt-get update --fix-missing
RUN apt-get install -y build-essential gcc-arm-linux-gnueabihf
import Vue from "vue";
import VueResource from "vue-resource";
import vueSlider from "vue-slider-component";
Vue.use(VueResource);
var app = new Vue({
el: "#vue-app",
data: {