Skip to content

Instantly share code, notes, and snippets.

View gwpl's full-sized avatar

Grzegorz Wierzowiecki gwpl

  • Europe - usually: Zürich, Warsaw or Berlin
View GitHub Profile
@dvdhrm
dvdhrm / hello-world.rs
Created December 5, 2018 10:36
UEFI Hello World in Rust
//
// Example: Hello World!
//
// This is an example UEFI application that prints "Hello World!", then waits for key input before
// it exits. It serves as base example how to write UEFI applications without any helper modules
// other than the UEFI protocol definitions.
//
// The `efi_main` function serves as entry-point. Depending on your target-configuration, this
// entry point might be called differently. If you use the target-configuration shipped with
// r-efi, then `efi_main` is the selected PE/COFF entry point.
@maximilize
maximilize / idlemon.py
Created September 13, 2018 03:01
Script to detect and shutdown not needed qubes VM's
#!/usr/bin/env python
import subprocess
import re
from collections import namedtuple
import binascii
import time
import json
IGNORE = """
nm-applet
@ipan
ipan / diff-jq.md
Created January 16, 2018 04:47
compare two JSONs with jq #json #jq
@mgeeky
mgeeky / xml-attacks.md
Last active October 27, 2025 18:13
XML Vulnerabilities and Attacks cheatsheet

XML Vulnerabilities

XML processing modules may be not secure against maliciously constructed data. An attacker could abuse XML features to carry out denial of service attacks, access logical files, generate network connections to other machines, or circumvent firewalls.

The penetration tester running XML tests against application will have to determine which XML parser is in use, and then to what kinds of below listed attacks that parser will be vulnerable.


@santisbon
santisbon / Search my gists.md
Last active December 31, 2025 14:22
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

use std::io::stdin;
use std::io::prelude::*;
use std::iter::*;
use std::str::SplitWhitespace;
fn main() {
let mut inp = InRead::new();
let t = inp.int();
for _ in 0..t {
let n = inp.int();
@fmarcia
fmarcia / git-change-date.sh
Created November 3, 2016 09:53 — forked from maciej/git-change-date.sh
git: Change the commit and/or author date of git commits.
#!/bin/sh
#
# Change the commit and/or author date of git commits.
#
# change-date [-f] commit-to-change [branch-to-rewrite [commit-date [author-date]]]
#
# If -f is supplied it is passed to "git filter-branch".
#
# If <branch-to-rewrite> is not provided or is empty HEAD will be used.
@IgnoredAmbience
IgnoredAmbience / 99-noto-mono-color-emoji.conf
Last active October 25, 2024 06:01
Noto Emoji Color fontconfig for Konsole
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Noto Mono + Color Emoji Font Configuration.
Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole.
Usage:
0. Ensure that the Noto fonts are installed on your machine.
1. Install this file to ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf
@ruyjfs
ruyjfs / culturagovbr-docker-run.bash
Last active April 7, 2021 15:54
Comandos de inicialização dos containers do Ministério da Cultura do Brasil. Startup commands of the containers of the Ministry of Culture of Brazil.
# Run container Nginx | Debian
docker run -it -v /var/www/:/var/www/ --name webserver-nginx-debian -p 80:80 culturagovbr/web-nginx-debian:0.1
# Run container Nginx | PHP 5 | Debian
docker run -it -v /var/www/:/var/www/ --name webserver-nginx-debian -p 80:80 --add-host local.salic:127.0.0.1 culturagovbr/web-nginx-php5-debian
# Run container Nginx | PHP 7 | Debian
docker run -it -v /var/www/:/var/www/ --name webserver-nginx-debian -p 80:80 culturagovbr/web-nginx-php7-debian:0.1
# Run container Apache | Debian
@gnuvince
gnuvince / binsearch.org
Last active April 13, 2024 17:45
Literate programming in Org-mode + Rust: binary search

Introduction

In the fourth chapter of “Programming Pearls”, Jon Bentley discusses program correctness and tells us that as part of some of his programming classes, he asks the attendees to implement the binary search algorithm. Although simple in appearance (“look at the middle element, if it’s the target terminate, if it’s smaller look in the upper half, otherwise look in the lower half”), it can be a surprisingly tricky algorithm to implement. He cites TAoCP Vol. 3 wherein Don Knuth mentions that although the first paper on binary