Skip to content

Instantly share code, notes, and snippets.

@bdsqqq
bdsqqq / vesper-dark.json
Last active April 1, 2024 17:44
Vesper theme for zed.dev
{
"$schema": "https://zed.dev/schema/themes/v0.1.0.json",
"name": "Vesper",
"author": "Rauno Freiberg",
"themes": [
{
"name": "Vesper",
"appearance": "dark",
"style": {
"border": "#101010",
@Mau5Machine
Mau5Machine / dynamic.yaml
Last active January 31, 2023 08:05
Traefik Dynamic Configuration File
## Setting up the middleware for redirect to https ##
http:
middlewares:
redirect:
redirectScheme:
scheme: https
@Mau5Machine
Mau5Machine / docker-compose.yml
Last active April 9, 2024 16:00
Traefik Configuration and Setup
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var elements = document.body.getElementsByTagName('*');
var items = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) {
items.push(elements[i]);
}
}
@vladox
vladox / download_sentry_data.py
Last active April 13, 2024 01:00 — forked from bubenkoff/download_sentry_data.py
Download all sentry events for a project. Useful for data processing
"""Download sentry data.
usage:
python download_sentry_data.py <org>/<project> <api_key>
"""
import requests
import csv
import sys
if __name__ == '__main__':
@AGlass0fMilk
AGlass0fMilk / 99-tb16-dock.rules
Last active May 16, 2020 08:59
Mixed DPI on Ubuntu - Dell XPS 15 9570 and TB16 dock with 4K internal/1080p external displays
# put the following in a udev rule file
# for example /etc/udev/rules.d/99-tb16-dock.rule
ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{device_name}=="Dell Thunderbolt Dock", RUN+="/bin/systemctl --no-block start configure-tb16-dock.service"
@fedme
fedme / install-virtualenv-ubuntu-zsh-wsl.md
Last active July 3, 2023 11:23
Install virtualenv on Ubuntu + ZSH (on WSL)

Virtualenv on WSL with ZSH

Install PIP

sudo apt install python-pip
sudo apt install python3-pip

pip --version
pip3 --version
@jackdpeterson
jackdpeterson / dock.sh
Created April 4, 2018 18:05
Ubuntu 18.04 - Mixed DPI with 4k Laptop monitor (HiDPI), and two LoDPI monitors (27", 21")
#!/bin/bash
echo "setting frame buffer" &&
xrandr --fb 12800x2880 &&
echo "setting laptop monitor" &&
xrandr --output eDP-1-1 --mode 3840x2160 --rate 60 --primary&&
echo "setting 27 inch monitor" &&
xrandr --output DP-0.2 --mode 2560x1440 --scale-from 5120x2880 --panning 5120x2880+3840+0 --right-of eDP-1-1 &&
echo "setting the samsung monitor" &&
xrandr --output DP-0.1 --mode 1920x1080 --scale-from 3840x2160 --panning 3840x2160+8960+0 --right-of DP-0.2&&
echo "setting global scaling to 2x" &&
@nicholaskajoh
nicholaskajoh / tribonacci_triangle.py
Created November 6, 2017 09:09
Python function to generate n rows of a Tribonacci Triangle.
def tribonacci_triangle(n):
# n <- number of rows to generate
# a <- tribonacci triangle
a = [[1], [1, 1]]
if n == 1:
return [[1]]
elif n == 2:
return a
else:
# generate rows 3 to n
anonymous
anonymous / gods.rs
Created November 4, 2017 15:37
We create gods and men in rust.
extern crate rand;
use std::iter::Iterator;
use std::collections::HashMap;
use rand::{thread_rng, Rng};
macro_rules! s {
($x: expr) => {
$x.to_owned()
};