Skip to content

Instantly share code, notes, and snippets.

View llivejo's full-sized avatar

Vsevolod S llivejo

  • Belgrade, Serbia
View GitHub Profile
@ityonemo
ityonemo / test.md
Last active May 5, 2024 15:42
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@blakebjorn
blakebjorn / jinjaExample.py
Created March 9, 2018 15:38
pdf generation with jinja2 and html
import pandas as pd
import jinja2
import pdfkit
from random import getrandbits, randint
# pdfkit is just a wrapper for whktmltopdf. you need to install wkhtml and have it on the path
# alternatively, you can move wkhtmltoimage.exe, wkhtmltopdf.exe and wkhtmltox.dll into the working directory
# Create some data
def random_hex(length=10):