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)
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
View .mongorc.js
__ansi = {
csi: String.fromCharCode(0x1B) + '[',
reset: '0',
text_prop: 'm',
foreground: '3',
bright: '1',
underline: '4',
colors: {
red: '1',
View Default (OSX).sublime-keymap
[
{
"keys": ["option+i"],
"args": null,
"command": "swap_case"
},
{
"keys": ["option+="],
"command": "show_overlay",
@PseudoSky
PseudoSky / MakeFacebookUseful.js
Created Jun 22, 2017
Removes all the sponsored ads and shared content from the facebook timeline..
View MakeFacebookUseful.js
// Run this from the chrome console
// Somehow facebook blocks window intervals...
function get_nth_parent(e, n){
e=e.parentElement
if(n==0) return e;
return get_nth_parent(e, n-1);
}
function remove_shared_shit(){
@PseudoSky
PseudoSky / domains-like.js
Created Jan 2, 2017
A fuzzy search for domain urls using wikireverse
View domains-like.js
// GO TO https://wikireverse.org/
function inj(service){
service = service|| "$rootScope";
return angular.element(document.body).injector().get(service);
}
$http=inj('$http');
entries=[]
View Gruntfile.js
// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= rootGeneratorName() %> <%= rootGeneratorVersion() %>
'use strict';
module.exports = function(grunt) {
var localConfig;
try {
localConfig = require('./server/config/local.env');
} catch(e) {
localConfig = {};
}
You can’t perform that action at this time.