Skip to content

Instantly share code, notes, and snippets.

View PedroSFreitas's full-sized avatar
💭
I may be slow to respond.

Pedro F. PedroSFreitas

💭
I may be slow to respond.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am pedrosfreitas on github.
  • I am psf_ (https://keybase.io/psf_) on keybase.
  • I have a public key ASBFxja7EawrtPqGLK2hPc5QbNJp827v2hIcJiTDYUeMAwo

To claim this, I am signing this object:

@PedroSFreitas
PedroSFreitas / nginx_logs.py
Created September 20, 2018 14:41 — forked from SegFaultAX/nginx_logs.py
Parse nginx logs to sqlite3
#!/usr/bin/env python
# The MIT License (MIT)
# Copyright (c) 2016 Michael-Keith Bernard
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
FROM archlinux/base
MAINTAINER psf
USER root
ENV HOME /root
WORKDIR /root
RUN echo '[multilib]' >> /etc/pacman.conf && \
echo 'Include = /etc/pacman.d/mirrorlist' >> /etc/pacman.conf

radare2

load without any analysis (file header at offset 0x0): r2 -n /path/to/file

  • analyze all: aa
  • show sections: iS
  • list functions: afl
  • list imports: ii
  • list entrypoints: ie
  • seek to function: s sym.main
@PedroSFreitas
PedroSFreitas / fix-infinality.md
Created January 16, 2018 00:45 — forked from cryzed/fix-infinality.md
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@PedroSFreitas
PedroSFreitas / tmux-cheatsheet.markdown
Created October 14, 2017 20:17 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname