Skip to content

Instantly share code, notes, and snippets.

View b3z's full-sized avatar
🚿
showering

b3z

🚿
showering
  • 04:30 (UTC +02:00)
View GitHub Profile
@b3z
b3z / .gitignore
Last active September 1, 2022 17:29
My tex gitignore
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.soc
*.toc
@b3z
b3z / SimplexSolverExample.java
Last active November 26, 2021 06:44
Apache Commons math3 Simplex solver example
import java.util.ArrayList;
import java.util.Collection;
import org.apache.commons.math3.optim.MaxIter;
import org.apache.commons.math3.optim.PointValuePair;
import org.apache.commons.math3.optim.linear.LinearConstraint;
import org.apache.commons.math3.optim.linear.LinearConstraintSet;
import org.apache.commons.math3.optim.linear.LinearObjectiveFunction;
import org.apache.commons.math3.optim.linear.NonNegativeConstraint;
import org.apache.commons.math3.optim.linear.Relationship;
@b3z
b3z / olatDark.js
Last active November 14, 2021 15:32
Crappy OLAT Darkmode. But better than burning Eyes - paste in site inspect console - mod of MartB
(function() {
'use strict';
var cssStuff = "";
function addGlobalStyle(css) {
cssStuff += css + "\n";
}
function loadGlobalStyle(css) {
var html, style;
@b3z
b3z / nio_env.yml
Created November 18, 2021 18:17
A working PyNio environment for conda
name: nio
channels:
- conda-forge
- defaults
dependencies:
- boost-cpp=1.72.0=hdf9ef73_0
- bzip2=1.0.8=h0d85af4_4
- c-ares=1.18.0=h0d85af4_0
- ca-certificates=2021.10.8=h033912b_0
- cairo=1.16.0=hec6a9b0_1003
@b3z
b3z / ixDelAll.py
Last active December 1, 2021 09:55
Delete all ix.io entries of a user. (auth required in .netrc)
import requests
import re
user = "b3z"
response = requests.get(f"http://ix.io/user/{user}")
if response.status_code != 200:
print (f"Error:{response.status_code}")
res = re.compile("href=\"\/[a-zA-Z0-9]{4}\"").findall(str(response.content))
@b3z
b3z / pylsp.lua
Created June 14, 2023 13:14
Disable line to long warning in pylsp lua neovim and disable linebreaks when formatting
return {
settings = {
pylsp = {
plugins = {
pycodestyle = {
ignore = {'E501'}, -- This is the Error code for line too long.
maxLineLength = 200 -- This sets how long the line is allowed to be. Also has effect on formatter.
},
},
},