Skip to content

Instantly share code, notes, and snippets.

View matomesc's full-sized avatar

Mihai Tomescu matomesc

View GitHub Profile
@matomesc
matomesc / getmus.ps1
Created September 20, 2019 17:42 — forked from milleniumbug/getmus.ps1
download video from YouTube, extract music and normalize volume
param(
[string]$url
)
youtube-dl `
$url `
--quiet `
--extract-audio `
--audio-format mp3 `
--audio-quality 3 `
@matomesc
matomesc / Caddyfile
Created August 8, 2019 00:14 — forked from Ocramius/Caddyfile
Example docker + docker-compose + caddy + traefik setup that routes to multiple apps from one exposed HTTP port
:80 {
root /serve
}
@matomesc
matomesc / dumb-ap-wired-link.sh
Created November 18, 2018 19:59 — forked from braian87b/dumb-ap-wired-link.sh
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@matomesc
matomesc / Script_Template.ps1
Created June 21, 2017 18:18 — forked from 9to5IT/Script_Template.ps1
PowerShell: Script Template
#requires -version 2
<#
.SYNOPSIS
<Overview of script>
.DESCRIPTION
<Brief description of script>
.PARAMETER <Parameter_Name>
<Brief description of parameter input required. Repeat this attribute if required>
@matomesc
matomesc / rxjs_operators_by_example.md
Created March 30, 2017 23:24 — forked from btroncone/rxjs_operators_by_example.md
RxJS 5 Operators By Example
@matomesc
matomesc / redis.markdown
Created January 12, 2012 00:58 — forked from bdotdub/redis.markdown
Running redis using upstart on Ubuntu

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

@matomesc
matomesc / ubuntu-configure-sendmail-with-gmail
Created September 28, 2015 06:11 — forked from sshtmc/ubuntu-configure-sendmail-with-gmail
Ubuntu sendmail using smtp.gmail.com
#!/bin/bash
HOST=$(hostname)
function install_postfix() {
echo | sudo debconf-set-selections <<__EOF
postfix postfix/root_address string
postfix postfix/rfc1035_violation boolean false
postfix postfix/mydomain_warning boolean
postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

Exploiting Lua 5.1 on 32-bit Windows

The following Lua program generates a Lua bytecode program called ignore-unsigned-sga.fnt, which in turn loads a DLL from within an extremely locked down Lua 5.1 sandbox in a program called RelicCOH2.exe. The remainder of this document attempts to explain how this program works by a whirlwind tour of relevent bits of the Lua 5.1 virtual machine.

if string.dump(function()end):sub(1, 12) ~= "\27Lua\81\0\1\4\4\4\8\0" then
  error("This generator requires a 32-bit version of Lua 5.1")
end

local function outer()
  local magic -- In bytecode, the stack slot corresponding to this local is changed