Skip to content

Instantly share code, notes, and snippets.

:shipit:
^ This guy

adisbladis

:shipit:
^ This guy
Block or report user

Report or block adisbladis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@adisbladis
adisbladis / podman-shell.nix
Last active Feb 12, 2020
Use podman within a nix-shell
View podman-shell.nix
{ pkgs ? import <nixpkgs> {} }:
let
# To use this shell.nix on NixOS your user needs to be configured as such:
# users.extraUsers.adisbladis = {
# subUidRanges = [{ startUid = 100000; count = 65536; }];
# subGidRanges = [{ startGid = 100000; count = 65536; }];
# };
@adisbladis
adisbladis / iso.nix
Created Jan 3, 2020
Nixos custom iso
View iso.nix
# env NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix --no-out-link --show-trace
{ config, lib, pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix>
];
boot.kernelPackages = pkgs.linuxPackages_latest;
@adisbladis
adisbladis / envrc.bash
Created May 7, 2018
Better python dev experience with direnv + nix + pipenv
View envrc.bash
use nix
layout_nix_pipenv() {
if [[ ! -f Pipfile ]]; then
log_error 'No Pipfile found. Use `pipenv` to create a Pipfile first.'
exit 2
fi
# Use ram as virtualenv storage
@adisbladis
adisbladis / iso.nix
Last active Jan 6, 2020
Nixos custom iso
View iso.nix
# env NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix --no-out-link --show-trace
{ config, lib, pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix>
];
boot.kernelPackages = pkgs.linuxPackages_latest;
@adisbladis
adisbladis / elemental_ircd_decloaker.c
Created Aug 10, 2017
An elemental ircd decloaker
View elemental_ircd_decloaker.c
/*
Made by Adam Hose <adis@blad.is>
Licensed under the GNU General Public License v2.0
Most code is straight up copied from elemental ircd
*/
#include <stdio.h>
#include <stdlib.h>
@adisbladis
adisbladis / env1-shell.nix
Created Jul 17, 2019
Merge multilple shell.nix files using mkShell
View env1-shell.nix
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = [
pkgs.hello
];
shellHook = ''
echo env1
'';
@adisbladis
adisbladis / pkijs-decode-pem-node.js
Created May 10, 2018
Minimal example of loading a PEM certificate using pkijs (in nodejs)
View pkijs-decode-pem-node.js
#!/usr/bin/env node
// Minimal example of loading a PEM certificate using pkijs (in node)
// babel-polyfill needs to be loaded for pkijs
// It uses webcrypto which needs browser shims
require('babel-polyfill')
const Pkijs = require('pkijs')
const Asn1js = require('asn1js')
const FS = require('fs')
@adisbladis
adisbladis / zoom-us.nix
Created Aug 1, 2019
Run Zoom in Xephyr
View zoom-us.nix
{ pkgs ? import <nixpkgs> {} }:
let
xinitRc = pkgs.writeScript "zoom-xinitrc" ''
#!${pkgs.runtimeShell}
${pkgs.zoom-us}/bin/zoom-us &
exec ${pkgs.icewm}/bin/icewm
'';
@adisbladis
adisbladis / table.org
Last active Jul 23, 2019
gemset.nix duplicates
View table.org
PackageCount
multi_json-1rl0qy4inf1mp8mybfk56dfga0mvx97zwpmq5xmiwl5r770171nv19
thread_safe-0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy17
mini_portile2-15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy15
addressable-0bcm2hchn897xjhqj9zzsxf3n9xhddymj4lsclz508f4vw3av46l14
concurrent-ruby-1x07r23s7836cpp5z9yrlbpljcxpax14yw4fy4bnp6crhr6x24an13
tzinfo-1fjx9j327xpkkdlxwmkl3a8wqj7i4l4jwlrv3z13mg95z9wl253z13
nokogiri-02bjydih0j515szfv9mls195cvpyidh6ixm7dwbl3s2sbaxxk5s413
View override-beam.nix
{ pkgs, ...}:
let
scope = pkgs.newScope {
openssl = pkgs.openssl_1_1;
pkgs = pkgs // { openssl = pkgs.openssl_1_1; };
};
beam = pkgs.beam.override { callPackage = scope; };
in beam.interpreters.erlangR22
You can’t perform that action at this time.