Skip to content

Instantly share code, notes, and snippets.

{ stdenv
, fetchurl
, autoPatchelfHook
, python38
, archs ? []
}:
stdenv.mkDerivation rec {
pname = "symbiflow-arch-defs";
version = "20200914-111752-g05d68df0";
diff --git a/pkgs/development/compilers/glslang/default.nix b/pkgs/development/compilers/glslang/default.nix
index dee3f488ecc..560c37a7752 100644
--- a/pkgs/development/compilers/glslang/default.nix
+++ b/pkgs/development/compilers/glslang/default.nix
@@ -26,21 +26,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake python3 bison jq ];
enableParallelBuilding = true;
- postPatch = ''
- cp --no-preserve=mode -r "${spirv-tools.src}" External/spirv-tools
#!/usr/bin/env python
import json
import pymysql
import pymysql.cursors
def main():
connection = pymysql.connect(
host='localhost',
@CajuM
CajuM / Makefile
Created October 3, 2018 05:43
Fork bomb for Linux on x86-64
.PHONY: all clean
all: fbomb
fbomb: fbomb.elf
strip --strip-unneeded -o fbomb fbomb.elf
fbomb.elf: fbomb.o
ld --nmagic -o fbomb.elf fbomb.o
@CajuM
CajuM / wrt.py
Created October 6, 2017 10:15
A script to find a decent router
#!/usr/bin/env python3
import json
import requests
from lxml import etree
def toh_to_dict(html):
ret = {}
@CajuM
CajuM / fbomb.sh
Created October 5, 2017 23:50
A script to force a linux system into an unauthenticated root shell
#!/bin/bash
# Instructions:
# Run this script and after it fills the screen with errors for a few minutes
# forcefully shutdown the computer.
# At the next boot the initramfs should attempt to recover the filesystem
# automatically. If you're in luck fsck will need interaction and bingo!
# You've got a root shell. This works by preventing access to /etc/passwd and
# therefore authentication with the system's credentials is imposible
#
@CajuM
CajuM / onjn_lista_neagra.py
Created July 21, 2017 16:58
A script that downloads the black-list of ONJN Romania
#!/usr/bin/env python3
'''
A script that downloads the black-list of ONJN Romania
Usage: ./onjn_lista_neagra.py >onjn_lista_neagra.txt
'''
from lxml import etree
import requests
@CajuM
CajuM / extract_efi_certs.sh
Created June 8, 2017 18:16
A small script that extracts all certificates in your machine's efivars
#!/bin/sh
efi_root=/sys/firmware/efi/efivars
for efifname in $(ls $efi_root); do
certdb=$efi_root/$efifname
length=$(wc -c $certdb | awk '{print $1;}')
for i in $(seq 0 $length); do
tail -c $i $certdb | openssl x509 -inform der -out $efifname-$i.crt 2>/dev/null
done
done
@CajuM
CajuM / caget.py
Created September 12, 2016 10:35
A script to download the TLS certificates provided by a list of servers.
#!/usr/bin/env python3
import multiprocessing as mp
import socket
import time
import sys
import pathlib
import OpenSSL.SSL as SSL
import OpenSSL.crypto as crypto