Skip to content

Instantly share code, notes, and snippets.

View selurvedu's full-sized avatar
🐧
In GNU we trust

selurvedu

🐧
In GNU we trust
View GitHub Profile
@Arinerron
Arinerron / root.sh
Last active March 7, 2024 09:24
"Root" via dirtyc0w privilege escalation exploit (automation script) / Android (32 bit)
#!/bin/bash
# Give the usual warning.
clear;
echo "[INFO] Automated Android root script started.\n\n[WARN] Exploit requires sdk module \"NDK\".\nFor more information, visit the installation guide @ https://goo.gl/E2nmLF\n[INFO] Press Ctrl+C to stop the script if you need to install the NDK module. Waiting 10 seconds...";
sleep 10;
clear;
# Download and extract exploit files.
echo "[INFO] Downloading exploit files from GitHub...";
@selurvedu
selurvedu / mpris-now-playing.c
Last active July 18, 2021 10:44 — forked from grawity/mpris-now-playing.c
make -f mpris-now-playing.c
#if 0
pkg = glib-2.0 gio-2.0
src = $(MAKEFILE_LIST)
app = $(basename $(src))
CFLAGS = $(shell pkg-config --cflags $(pkg)) -x c
LDFLAGS = $(shell pkg-config --libs $(pkg))
$(app): $(src)
@joepie91
joepie91 / vpn.md
Last active May 9, 2024 17:09
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@doujiang24
doujiang24 / gist:fd5c7a46831a3df02f57
Created November 23, 2015 03:49
Lua get hostname
local ffi = require "ffi"
local C = ffi.C
ffi.cdef[[
int gethostname(char *name, size_t len);
]]
local size = 50
local buf = ffi.new("unsigned char[?]", size)
#if 0
pkg = glib-2.0 gio-2.0
src = $(MAKEFILE_LIST)
app = $(basename $(src))
CFLAGS = $(shell pkg-config --cflags $(pkg)) -x c
LDFLAGS = $(shell pkg-config --libs $(pkg))
$(app): $(src)
@schneiderfelipe
schneiderfelipe / cs.py
Last active December 4, 2017 20:26 — forked from myano/cs.py
#!/usr/bin/env python
import curses
import curses.textpad
def main_exec(stdscr):
begin_x = 20
begin_y = 7
height = 5
anonymous
anonymous / tmux.conf
Created September 9, 2014 18:35
vim friendly tmux configuration
#Prefix is Ctrl-a
set -g prefix C-a
bind C-a send-prefix
unbind C-b
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
#Mouse works as expected
@macedd
macedd / yaffey-qt5.patch
Created June 11, 2014 23:38
Yaffey Patch for QT5 Compilation (ubuntu 12, 13, 14)
diff -rupN yaffey-orig/main.cpp yaffey-qt5/main.cpp
--- yaffey-orig/main.cpp 2014-06-11 20:01:50.155769286 -0300
+++ yaffey-qt5/main.cpp 2014-06-11 20:24:07.659482714 -0300
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-#include <QtGui/QApplication>
+#include <QApplication>
@datagrok
datagrok / vendoring.md
Last active November 3, 2023 17:37
"Vendoring" is a vile anti-pattern

"Vendoring" is a vile anti-pattern

What is "vendoring"?

From a comment on StackOverflow:

Vendoring is the moving of all 3rd party items such as plugins, gems and even rails into the /vendor directory. This is one method for ensuring that all files are deployed to the production server the same as the dev environment.

The activity described above, on its own, is fine. It merely describes the deployment location for various resources in an application.

@pixelhandler
pixelhandler / pre-push.sh
Last active April 8, 2024 01:04
Git pre-push hook to prevent force pushing master branch
#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. Copy the file into your repo at `.git/hooks/pre-push`
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push`