Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / bonfire-truncate-a-string.js
Created December 9, 2015 07:18
http://www.freecodecamp.com/kkas 's solution for Bonfire: Truncate a string
// Bonfire: Truncate a string
// Author: @kkas
// Challenge: http://www.freecodecamp.com/challenges/bonfire-truncate-a-string
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function truncate(str, num) {
// Clear out that junk in your trunk
var len = num > 3 ? num - 3 : num;
return str.length > num ? str.slice(0, len) + "..." : str;
anonymous
anonymous / bonfire-truncate-a-string.js
Created December 11, 2015 06:28
http://www.freecodecamp.com/kkas 's solution for Bonfire: Truncate a string
// Bonfire: Truncate a string
// Author: @kkas
// Challenge: http://www.freecodecamp.com/challenges/bonfire-truncate-a-string
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function truncate(str, num) {
// Clear out that junk in your trunk
var len = num > 3 ? num - 3 : num;
return str.length > num ? str.slice(0, len) + "..." : str;
anonymous
anonymous / bonfire-chunky-monkey.js
Created December 11, 2015 06:41
http://www.freecodecamp.com/kkas 's solution for Bonfire: Chunky Monkey
// Bonfire: Chunky Monkey
// Author: @kkas
// Challenge: http://www.freecodecamp.com/challenges/bonfire-chunky-monkey
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function chunk(arr, size) {
// Break it up.
var i, len = arr.length, newAry = [];
for(i = 0; i < len; i += size) {
anonymous
anonymous / bonfire-slasher-flick.js
Created December 11, 2015 22:50
http://www.freecodecamp.com/kkas 's solution for Bonfire: Slasher Flick
// Bonfire: Slasher Flick
// Author: @kkas
// Challenge: http://www.freecodecamp.com/challenges/bonfire-slasher-flick
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function slasher(arr, howMany) {
// it doesn't always pay to be first
return arr.slice(howMany);
}
@HarmJ0y
HarmJ0y / PowerView-3.0-tricks.ps1
Last active May 15, 2025 16:25
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
@jstnlvns
jstnlvns / git: gitignore.md
Created November 16, 2018 19:42
a gitignore cheatsheet

Git sees every file in your working copy as one of three things:

  1. tracked - a file which has been previously staged or committed;
  2. untracked - a file which has not been staged or committed; or
  3. ignored - a file which Git has been explicitly told to ignore.

Ignored files are usually build artifacts and machine generated files that can be derived from your repository source or should otherwise not be committed. Some common examples are:

  • dependency caches, such as the contents of /node_modules or /packages
  • compiled code, such as .o, .pyc, and .class files
@CMNatic
CMNatic / cloudSettings
Last active October 5, 2023 19:22
TryHackMe OWASP-10-A8: Insecure Deserialization RCE PoC
{"lastUpload":"2021-08-31T08:20:42.057Z","extensionVersion":"v3.4.3"}