- 500 g stew meat (beef, chicken, or vegetarian alternatives such as tofu or Quorn)
- 2 tbsp olive oil
- 1 onion, chopped
- 2 cloves garlic, minced
- 2 carrots, sliced
- 2 celery stalks, sliced
- 1 red bell pepper, diced
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
# Created by ChatGPT 4.0o, untested | |
SRC_DIR := . | |
BUILD_DIR := public_html | |
DEST_DIR := /path/to/production | |
SERVER := user@production-server.com | |
MD_FILES := $(wildcard $(SRC_DIR)/*.md) | |
HTML_FILES := $(MD_FILES:$(SRC_DIR)/%.md=$(BUILD_DIR)/%.html) | |
# Rule to convert markdown to HTML |
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
SRC_DIR := . | |
# TODO: Change DEST_DIR and SERVER to match your site | |
DEST_DIR := /var/www/production | |
SERVER := user@production-server.com | |
HTML_FILES := $(wildcard $(SRC_DIR)/*.html) | |
PHP_FILES := $(wildcard $(SRC_DIR)/*.php) | |
FILES := $(HTML_FILES) $(PHP_FILES) |
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
# (män, kvinnor), 5-årsintervaller, källa: | |
# https://www.scb.se/hitta-statistik/sverige-i-siffror/manniskorna-i-sverige/befolkningspyramid-for-sverige/ | |
a = [(296183, 280184), (319820, 301335), (325003, 306568), (310539, 292308), (310354, 275136), (342974, 323678), (400939, 379866), (357035, 337476), (331475, 316375), (332100, 320776), (334354, 326130), (344012, 334707), (288783, 286309), (268962, 273778), (255190, 269193), (238376, 259291), (140775, 167556), (69776, 102177), (25990, 52397), (5259, 15730), (425, 2262)] | |
totalt = sum(map(sum, a)) | |
# 6 första intervallerna är 0-4, 5-9, 10-14, 15-19, 20-24, 25-29 | |
under_tretti = sum(map(sum, a[:6])) | |
print(100 * under_tretti / totalt) |
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
# To make a long story short | |
# Install apt source | |
curl -fsSL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo gpg --dearmor --output /usr/share/keyrings/intel-sw-products.gpg | |
echo "deb [signed-by=/usr/share/keyrings/intel-sw-products.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/intel-oneapi.list | |
apt update | |
# Install oneapi | |
apt install intel-oneapi-runtime-opencl intel-basekit clinfo opencl-headers |
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
import numpy as np | |
def fib(n): | |
"""Fibonacci using matrix exponentiation""" | |
m = np.array([[1, 1], [1, 0]]) | |
pow_m = np.linalg.matrix_power(m, n) | |
return pow_m[0, 1] |
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
123456 | |
123456789 | |
qwerty | |
password | |
12345678 | |
111111 | |
qwerty123 | |
1q2w3e | |
1234567 | |
abc123 |
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
#!/usr/bin/env python | |
import random | |
things = [ 'chips', 'husdjur', 'demoner', 'jesus', 'popcorn', 'bullar', 'saft', 'ärtor', 'pengar', 'godis', 'kaffe', 'te', 'kebab', 'pizza', 'paket', 'mamma', 'tandkräm', 'gröt', 'AK47', 'proteinshake', 'ägg', 'pannkakor', 'fiskbullar', 'köttbullar', 'spaghetti', 'nudlar', 'flingor', 'apelsinjuice', 'ostmackor', 'havregryn', 'strumpor', 'byxor', 'solrosfrön', 'senap', 'ketchup', 'små rymdgubbar', 'tomtenissar', 'ostbågar', 'rostad majs', 'lillasyster', 'citronbitare', 'fiskpinnar', 'knäckebröd', 'julmust' ] | |
places = [ 'på spisen', 'i ugnen', 'i torkskåpet', 'under sängen', 'bakom soffan', 'på dagis', 'hos rektorn', 'i himlen', 'i hallen', 'i kyrkan', 'i fotöljen', 'i gondolen', 'i Sherwoodskogen', 'i kaffekoppen', 'i blodomloppet', 'i magen', 'i flaskan', 'i badrumsskåpet', 'i toaletten', 'på nätet', 'på toasitsen', 'på golvet', 'på vinden', 'på taket', 'på stolen', 'på hatthyllan', 'på varmvattenpumpen', 'på bänken', 'på båten', 'på steam', 'på ICA', 'på netflix', 'på s |
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
#!/usr/bin/env python3 | |
import sys | |
# Return list of [(min, max), char, password] | |
def read_input(fname): | |
r = [] | |
for line in open(fname).read().splitlines(): | |
a = line.split() | |
a[0] = tuple(map(int, a[0].split('-'))) |
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 xkcd hash | |
echo -n "CorrectHorseBatteryStaple" | md5sum | awk '{ print $1 }' > md5.hash | |
cat md5.hash | |
f6f9b174745fa4651f750c36957d674c | |
# Get 20k wordlist (containing all 4 words) | |
wget https://raw.githubusercontent.com/first20hours/google-10000-english/master/20k.txt | |
# Pick 2k top words to speed up attack: | |
head -2000 20k.txt > 2k.txt |
NewerOlder