Skip to content

Instantly share code, notes, and snippets.

@PseudoSky
PseudoSky / 1_Notes.md
Last active Jul 2, 2020
Data structures & Algorithms
View 1_Notes.md
Input : Inorder -> 4 2 5 1 3
        Preorder -> 1 2 4 5 3
        Postorder -> 4 5 2 3 1
Output : Yes
Exaplanation : All of the above three traversals are of 
the same tree              1
View vindecoder.js
/**
* VIN decoder.
*
* kevinboutin on 3/11/18.
*
* My VIN for testing is WBA3A5G59DNP26082 so use the following command to invoke:
* node vindecoder WBA3A5G59DNP26082
*
* Examples:
* KM8JM12D56U303366
@PseudoSky
PseudoSky / README.md
Created Oct 31, 2018
Extract a dom nodes css selector
View README.md

SmartSelect

Compute and minify an element's css selector

gistFileNameInput = '#gists > div:nth-child(4) > div > div.file-header > div.input-group.gist-filename-input > input.form-control.filename.js-gist-filename.js-blob-filename'
gistFileNameInput.length
> 151

newSelect = SmartSelect.cssPath(gistFileNameInput)
@PseudoSky
PseudoSky / export-style.js
Last active Oct 9, 2018
Javascript function that will export all current css arrtibutes on a dom element
View export-style.js
Element.prototype.es = (function () {
// Mapping between tag names and css default values lookup tables. This allows to exclude default values in the result.
var defaultStylesByTagName = {};
// Styles inherited from style sheets will not be rendered for elements with these tag names
var noStyleTags = {"BASE":true,"HEAD":true,"META":true,"NOFRAME":true,"NOSCRIPT":true,"PARAM":true,"SCRIPT":true,"STYLE":true,"TITLE":true};
// This list determines which css default values lookup tables are precomputed at load time
// Lookup tables for other tag names will be automatically built at runtime if needed
View Default (OSX).sublime-keymap
[
{
"keys": ["option+i"],
"args": null,
"command": "swap_case"
},
{
"keys": ["option+="],
"command": "show_overlay",
@PseudoSky
PseudoSky / nmap-scripts.json
Created Nov 9, 2016
Security Tools Help & Data
View nmap-scripts.json
[
{
"link": "https://nmap.org/nsedoc/scripts/acarsd-info.html",
"name": "acarsd-info",
"info": "Retrieves information from a listening acarsd daemon. Acarsd decodes ACARS (Aircraft Communication Addressing and Reporting System) data in real time. The information retrieved by this script includes the daemon version, API version, administrator e-mail address and listening frequency."
},
{
"link": "https://nmap.org/nsedoc/scripts/address-info.html",
"name": "address-info",
"info": "Shows extra information about IPv6 addresses, such as embedded MAC or IPv4 addresses when available."
View particles.js
var SEPARATION = 80, AMOUNTX = 50, AMOUNTY = 50;
var container, stats;
var camera, scene, renderer;
var startX, startY;
var particles, particle, count = 0;
var windowHalfX = window.innerWidth / 2;
var windowHalfY = window.innerHeight / 3;
var mouseX = 0, mouseY = 50;
@PseudoSky
PseudoSky / Apentest2015
Created Dec 21, 2017 — forked from CHEF-KOCH/Apentest2015
Android Penetration Testing Tools 2015
View Apentest2015
Android Penetration Testing Tools 2015
by CHEF-KOCH
==============
Note:
1. These apps are not for beginners because expertise is needed on the Android platform.
2. Most of the apps work on Rooted Android devices. So root your Android device first. If you are not sure how to do it, learn how to by, reading one of the many sites available to help with this process.
3. You will lose your device’s warranty if you root it, so think twice before proceeding.
4. These apps can also harm your Android device. So please try these apps at your own risk
@PseudoSky
PseudoSky / .bash_profile
Last active Dec 12, 2017
dot files and environment (you should NEVER blindly use peoples dot files)
View .bash_profile
export PATH=/usr/local/lib:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
. ~/dot/snowbash
. ~/dot/completions
genpath
export PATH="/usr/local/bin:$PATH";
export NODE_ENV="development"
export NVM_DIR="/usr/local/nvm"
View .mongorc.js
__ansi = {
csi: String.fromCharCode(0x1B) + '[',
reset: '0',
text_prop: 'm',
foreground: '3',
bright: '1',
underline: '4',
colors: {
red: '1',
You can’t perform that action at this time.