Skip to content

Instantly share code, notes, and snippets.

View dumpofmemory's full-sized avatar
🎯
Focusing

Sam dumpofmemory

🎯
Focusing
View GitHub Profile
@dumpofmemory
dumpofmemory / array_dupplicate_counter.js
Created December 19, 2016 10:31 — forked from ralphcrisostomo/array_dupplicate_counter.js
Javascript: Count duplicates in an array
/**
Problem:
You have a javascript array that likely has some duplicate values and you would like a count of those values.
Solution:
Try this schnippet out.
*/
@dumpofmemory
dumpofmemory / A.markdown
Created March 1, 2017 11:21 — forked from larrybotha/A.markdown
Fix SVGs not scaling in IE9, IE10, and IE11

Fix SVG in <img> tags not scaling in IE9, IE10, IE11

IE9, IE10, and IE11 don't properly scale SVG files added with img tags when viewBox, width and height attributes are specified. View this codepen on the different browsers.

Image heights will not scale when the images are inside containers narrower than image widths. This can be resolved in 2 ways.

Use sed in bash to remove width and height attributes in SVG files

As per this answer on Stackoverflow, the issue can be resolved by removing just the width and height attributes.

@dumpofmemory
dumpofmemory / repo-reset.md
Created March 20, 2018 14:25 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@dumpofmemory
dumpofmemory / .eslintrc
Created July 13, 2019 13:06 — forked from 1natsu172/.eslintrc
My airbnb based ESLint config for "typescript-eslint" with React & prettier
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "."
},
"env": {
"browser": true,
"jest/globals": true
},
// TextAreaInput.jsx
import React, { Fragment } from 'react'
import PropTypes from 'prop-types'
import InputError from './InputError'
const TextAreaInput = ({
labelText,
id,
className,
labelClassName,
@dumpofmemory
dumpofmemory / command.txt
Created November 12, 2019 12:28 — forked from fbn4sc/command.txt
Delete all branches except master and develop.
git branch | grep -v "master\|develop" | xargs git branch -D
@dumpofmemory
dumpofmemory / kali_docker_install.sh
Created February 16, 2020 19:53 — forked from decidedlygray/kali_docker_install.sh
Docker install script for Kali Rolling
#!/bin/bash
#
# Kali Docker Setup Script
# @decidedlygray 20180902
# LICENSE: MIT
#
# Steps taken from: https://docs.docker.com/install/linux/docker-ce/debian/
# And: https://medium.com/@airman604/installing-docker-in-kali-linux-2017-1-fbaa4d1447fe
# Install uses the repository, so we can get updates in the future
@dumpofmemory
dumpofmemory / PowerView-3.0-tricks.ps1
Created April 30, 2021 18:12 — forked from HarmJ0y/PowerView-3.0-tricks.ps1
PowerView-3.0 tips and tricks
# PowerView's last major overhaul is detailed here: http://www.harmj0y.net/blog/powershell/make-powerview-great-again/
# tricks for the 'old' PowerView are at https://gist.github.com/HarmJ0y/3328d954607d71362e3c
# the most up-to-date version of PowerView will always be in the dev branch of PowerSploit:
# https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1
# New function naming schema:
# Verbs:
# Get : retrieve full raw data sets
# Find : ‘find’ specific data entries in a data set
@dumpofmemory
dumpofmemory / Privilege Escalation.md
Created May 2, 2021 18:51 — forked from A1vinSmith/Privilege Escalation.md
Privilege Escalation: Systemctl (Misconfigured Permissions — sudo/SUID)