Skip to content

Instantly share code, notes, and snippets.

View adisbladis's full-sized avatar
:shipit:
^ This guy

adisbladis

:shipit:
^ This guy
View GitHub Profile
ERROR: libnvidia-gtk3.so.387.22: cannot open shared object file: No such file or directory
libnvidia-gtk3.so: cannot open shared object file: No such file or directory
libnvidia-gtk2.so.387.22: cannot open shared object file: No such file or directory
libnvidia-gtk2.so: cannot open shared object file: No such file or directory
ERROR: A problem occured when loading the GUI library. Please check your installation and library path. You may need to specify this library when calling nvidia-settings. Please run
`/nix/store/vixh24x3b2kgr7b3pmly2r3q2zca93pr-nvidia-settings-387.22/bin/nvidia-settings --help` for usage information.
[adisbladis@gari:~]$ nix-shell -p curlFull --run 'curl --compressed -v https://tools.keycdn.com/brotli-test > /dev/null'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 66.228.37.207...
* TCP_NODELAY set
* Trying 2600:3c03::f03c:91ff:fe89:799e...
* TCP_NODELAY set
* Immediate connect fail for 2600:3c03::f03c:91ff:fe89:799e: Network is unreachable
* Connected to tools.keycdn.com (66.228.37.207) port 443 (#0)
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* ALPN, offering h2
[nix-shell:~]$ ldd /nix/store/mv9hzr4qwpk4y1p1dcaq3jbypnhgs60v-linphone-3.12.0/bin/.linphone-daemon-wrapped
linux-vdso.so.1 (0x00007fffd8fc1000)
libmediastreamer_voip.so.10 => /nix/store/vcw5arm1116h8x78mlyprwjj32hapb97-mediastreamer2-2.16.1/lib/libmediastreamer_voip.so.10 (0x00007f84abe78000)
libmediastreamer_base.so.10 => /nix/store/vcw5arm1116h8x78mlyprwjj32hapb97-mediastreamer2-2.16.1/lib/libmediastreamer_base.so.10 (0x00007f84abc62000)
libortp.so.13 => /nix/store/2pb1ad1wnjfw3j8rsqxwdxpr2mm8zpcl-ortp-1.0.2/lib/libortp.so.13 (0x00007f84aba34000)
libbctoolbox.so.1 => /nix/store/si7qpim7xf92qj6xf3d4hzv1x6ca502k-bctoolbox-0.6.0/lib/libbctoolbox.so.1 (0x00007f84ab819000)
libbellesip.so.0 => /nix/store/9ydd3czrf7f1b3yhyfylj661620v7gj5-belle-sip-1.6.3/lib/libbellesip.so.0 (0x00007f84ab320000)
libxml2.so.2 => /nix/store/3klpkjgks74fywwk2fidaagpl5jq9q4p-libxml2-2.9.7/lib/libxml2.so.2 (0x00007f84aafbc000)
libbzrtp.so.0 => /nix/store/2qh1dvb7p3aq3ay32s
{
"name": "example-nix-project",
"version": "0.1.0",
"dependencies": {
"imagemagick-native": "^1.9.3"
},
"devDependencies": {}
}
# Teclast X98 Pro nixos install iso
# nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix --no-out-link --show-trace
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix>
];
# Hardware is only well-supported on very recent kernels
In this moment of year NixPkgs already close to half of the umber of commits from previous year.
commits=12747/26374=0.483
velocity_last_year=26374/365=72.258 commits/day
velocity_this_time=12747/109=116.945 commits/day
velocity_times=velocity_this_year/velocity_last_year=1.618 times
accel=(velocity_this_time-velocity_last_year)/current_day=0.410 commits/day^2
velocity_end_of_year_extrapolated=velocity_last_year+365*accel=221.899 commits/day
@adisbladis
adisbladis / findprocs.js
Created April 30, 2018 09:56
Finding child processes recursive in nodejs without external dependencies
#!/usr/bin/env node
const ChildProcess = require('child_process')
function findChildren(pid) {
const pgrep = ChildProcess.spawnSync('pgrep', ['-P', pid])
// Probably segfault..
// Happens on linux at least when there is no child
if(pgrep.status === null) {
@adisbladis
adisbladis / para.py
Created June 8, 2018 02:29
Paramiko example with proper stderr/stdout behaviour
import contextlib
import functools
import paramiko
import select
import sys
import os
if __name__ == '__main__':
@adisbladis
adisbladis / shell.nix
Created June 12, 2018 08:44
Build android applications from nix-shell without FHS env
with (import <nixpkgs> {});
let
# Extract license from a Linux box
# It's in ~/Android/Sdk/licenses/android-sdk-license
sdkLicense = "d56f5187479451eabf01fb78af6dfcb131a6481e";
in pkgs.mkShell {
buildInputs = with pkgs; [
@adisbladis
adisbladis / .envrc
Created June 18, 2018 08:14
Minimal example nix project with direnv
use nix