Skip to content

Instantly share code, notes, and snippets.

@diego3g
diego3g / settings.json
Last active April 26, 2024 12:18
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
@AhmedMostafa16
AhmedMostafa16 / .font.conf
Created July 25, 2021 13:39
My .font.conf for perfect font rendering
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>~/.fonts</dir>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@matthen
matthen / hello_world.py
Last active April 26, 2024 12:17
Hello world in python, using genetic algorithm
"""Hello world, with a genetic algorithm.
https://twitter.com/matthen2/status/1769368467067621791
"""
import random
import time
from dataclasses import dataclass
from itertools import chain
from typing import Iterable, List
@fosterseth
fosterseth / awx_how_a_job_runs.md
Last active April 26, 2024 12:17
How a job runs
@bmaupin
bmaupin / free-database-hosting.md
Last active April 26, 2024 12:17
Free database hosting
@gelldur
gelldur / Grafana Alert Template.md
Last active April 26, 2024 12:17 — forked from Himura2la/Grafana Alert Template.md
How to use Grafana Alerts with the Telegram
  • Template name: telegram.message
  • Content:
    {{- /* Telegram message to use: {{ template "telegram.message2" . }} */ -}}
    {{ define "__alerts_list" -}}
    {{ range . }}
    {{if ne (index .Labels "alertname") "" -}}
    {{ if eq .Status "firing" }}🔴{{ else }}🟢{{ end }}
        {{- if ne (index .Labels "severity") "" -}}
            <u><b>P{{ index .Labels "severity" }}</b></u> {{ end -}}
@Ankowa
Ankowa / example.py
Last active April 26, 2024 12:15
MIA_example
import torch
from torch.utils.data import Dataset
from typing import Tuple
import numpy as np
import requests
import pandas as pd
#### LOADING THE MODEL
from torchvision.models import resnet18
@ei-grad
ei-grad / conda.conf
Created March 21, 2020 20:07
Nginx caching proxy for conda
# /etc/nginx/conf.d/conda.conf
proxy_cache_path /var/cache/nginx/conda levels=2:2 keys_zone=conda:100m inactive=14d max_size=10g;
upstream conda.anaconda.org {
server 104.17.92.24:443;
server 104.17.93.24:443;
}
server {
listen 80;
@DMeechan
DMeechan / word-list.js
Last active April 21, 2024 12:32
BIP39 mnemonic phases word list (2048 words)
const WORDLIST = ["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse",
"access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act",
"action","actor","actress","actual","adapt","add","addict","address","adjust","admit",
"adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent",
"agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert",
"alien","all","alley","allow","almost","alone","alpha","already","also","alter",
"always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger",
"angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique",
"anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic",
"area","arena","argue","arm","armed","armor","army","around","arrange","arrest",
@jd7h
jd7h / script.py
Created February 3, 2020 16:11 — forked from efonte/script.py
Disco Elysium texts
import re
strings = set()
with open('texts.txt', mode='r', encoding='utf-8') as file_input:
content = file_input.read()
regExStr = r'^\s*\d string title = "(?:tooltip\d+|Name|Dialogue Text)"\n\s*\d string value = "((?!(START|input|\w+\(\)|\!\(\w+\(\)\))).+)"$'
compiled = re.compile(regExStr, re.MULTILINE)
matched = compiled.finditer(content)