Skip to content

Instantly share code, notes, and snippets.

View amalbuquerque's full-sized avatar

André Albuquerque amalbuquerque

View GitHub Profile
@sleirsgoevy
sleirsgoevy / ipv6-df-2.c
Last active March 8, 2021 15:34
FreeBSD 9 PoC of kernel code execution using the new TheFlow vulnerability
#include <sys/types.h>
#include <sys/param.h>
#include <sys/cpuset.h>
#include <sys/socket.h>
#include <sys/mman.h>
#include <sys/sysctl.h>
#include <sys/vmmeter.h>
#include <netinet/in.h>
#include <string.h>
#include <unistd.h>
@vitouXY
vitouXY / Configure-Ethernet-RNDIS-PiZero-connection.ps1
Last active May 22, 2023 18:14
Raspberry Pi Zero W - USB Gadget (libcomposite) - TinyCoreLinux (piCore)
# copyright Threadsec Inc
# This script auto-configure and ssh auto-connect to RPi ZERO Ethernet gadget VID:0x1d6b PID:0x0137
# This script require admin right to access to adapter conf.
# https://threadsec.wordpress.com/raspberry-pi-zero-usb-composite-gadget/
#
# Edit $user=""
# Windows 10 : As Admin, run:
# powershell -ep bypass -file Configure-Ethernet-RNDIS-PiZero-connection.ps1
#
Clear-Host
@Qqwy
Qqwy / Example.ex
Created July 11, 2020 21:51
Elixir 'safe macro override' example implementation
defmodule Example do
use OverrideExample1
use OverrideExample2
@a 1
@b 2
end
# Prints at compile-time:
#
# yaay: {:a, [line: 4], [1]}
# wooh: {:a, [line: 4, context: OverrideExample2], [1]}
@andy-thomason
andy-thomason / Genomics_A_Programmers_Guide.md
Created May 14, 2019 13:32
Genomics a programmers introduction

Genomics - A programmer's guide.

Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.

https://www.genomicsplc.com

@jessfraz
jessfraz / boxstarter.ps1
Last active July 7, 2024 22:46
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@ggreer
ggreer / fonts.conf
Created June 11, 2017 05:29
How to disable anti-aliasing & subpixel hinting for a specific font.
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<test name="family" qual="any" compare="eq">
<string>ProggyTinyTTSZ</string>
</test>
<edit mode="assign" name="antialias">
<bool>false</bool>
</edit>
@AndrewDryga
AndrewDryga / erl-observe.sh
Last active July 11, 2023 01:20
Script for connecting Erlang Observer to remote node hosted in Kubernetes
#!/bin/bash
# This script provides easy way to debug remote Erlang nodes that is running in a kubernetes cluster.
# Usage: ./erl-observe.sh -l app=my_all -n default -c erlang_cookie
#
# Don't forget to include `:runtime_tools` in your mix.exs application dependencies.
set -e
# Trap exit so we can try to kill proxies that has stuck in background
function cleanup {
echo " - Stopping kubectl proxy."
@nicinabox
nicinabox / lets split build guide.md
Last active January 28, 2023 04:10
This guide covers building a Let's Split v2.

This guide has moved

To improve collaboration this guide is now available on GitHub.

Continue reading

@skosch
skosch / grafana_dashboard.json
Last active January 23, 2022 01:18
Very simple Grafana dashboard for Prometheus Elixir metrics
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@gbaman
gbaman / HowToOTGFast.md
Last active July 19, 2024 23:49
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i