sudo apt install python-pip
sudo apt install python3-pip
pip --version
pip3 --version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://zed.dev/schema/themes/v0.1.0.json", | |
"name": "Vesper", | |
"author": "Rauno Freiberg", | |
"themes": [ | |
{ | |
"name": "Vesper", | |
"appearance": "dark", | |
"style": { | |
"border": "#101010", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Setting up the middleware for redirect to https ## | |
http: | |
middlewares: | |
redirect: | |
redirectScheme: | |
scheme: https |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
services: | |
################################################ | |
#### Traefik Proxy Setup ##### | |
############################################### | |
traefik: | |
image: traefik:v2.0 | |
restart: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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]); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Download sentry data. | |
usage: | |
python download_sentry_data.py <org>/<project> <api_key> | |
""" | |
import requests | |
import csv | |
import sys | |
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" && |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate rand; | |
use std::iter::Iterator; | |
use std::collections::HashMap; | |
use rand::{thread_rng, Rng}; | |
macro_rules! s { | |
($x: expr) => { | |
$x.to_owned() | |
}; |
NewerOlder