Skip to content

Instantly share code, notes, and snippets.

View chrisdlees's full-sized avatar

Chris Lees chrisdlees

View GitHub Profile
# The following will split a CSV (file.csv) into multiple parts of 1 million lines each
# with each part having its own header.
#
# PREFIX denotes the filename to use for the parts. A number will be added to the end.
tail -n +2 file.csv |
split -d -l 1000000 - --filter='sh -c "{ head -n1 file.csv; cat; } > $FILE"' PREFIX
# Set up the constants:
$ObjectPronouns = 'Her', 'Him', 'Them'
$PossesivePronouns = 'Her', 'His', 'Their'
$PersonalPronouns = 'She', 'He', 'They'
$States = 'California', 'Texas', 'Florida', 'New York', 'Pennsylvania', 'Illinois', 'Ohio', 'Georgia', 'North Carolina', 'Michigan'
$Nouns = 'Athlete', 'Clown', 'Shovel', 'Paleo Diet', 'Doctor', 'Parent', 'Cat', 'Dog', 'Chicken', 'Robot', 'Video Game', 'Avocado', 'Plastic Straw', 'Serial Killer', 'Telephone Psychic'
$Places = 'House', 'Attic', 'Bank Deposit Box', 'School', 'Basement', 'Workplace', 'Donut Shop', 'Apocalypse Bunker'
$When = 'Soon', 'This Year', 'Later Today', 'RIGHT NOW', 'Next Week'
function generateAreMillennialsKillingHeadline {
@chrisdlees
chrisdlees / job-import.js
Created January 3, 2022 23:10 — forked from jaywon/job-import.js
CSV import utility for Node
var fs = require('fs');
var csv = require('fast-csv');
var stream = fs.createReadStream('/home/jaywon/Downloads/modified-salary-per-state-per-jobtitle.csv');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var masterList = [];
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/job-imports');
//define schema for import data
@chrisdlees
chrisdlees / FileDownloader.cs
Created January 31, 2022 11:19 — forked from yasirkula/FileDownloader.cs
C# Download Public File From Google Drive™ (works for large files as well)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Net;
using System.Text;
/* EXAMPLE USAGE
FileDownloader fileDownloader = new FileDownloader();
function Get-ObliqueStrategy{
$(
"(Organic) machinery"
"A line has two sides"
"A very small object Its center"
"Abandon desire"
"Abandon normal instructions"
"Abandon normal instruments"
"Accept advice"
"Accretion"

Keybase proof

I hereby claim:

  • I am chrisdlees on github.
  • I am chrislees (https://keybase.io/chrislees) on keybase.
  • I have a public key ASC-MwivAKFKs-QC_rasnWhj6Vqhi4JncXHcmjOdKfibDwo

To claim this, I am signing this object:

@chrisdlees
chrisdlees / replace-bash-with-zsh-no-root.sh
Created October 24, 2022 06:42 — forked from afurculita/replace-bash-with-zsh-no-root.sh
Making zsh default shell without root access
# Create .bash_profile in your home directory and add these lines:
export SHELL=/bin/zsh
exec /bin/zsh -l
@chrisdlees
chrisdlees / PowerView-3.0-tricks.ps1
Created October 25, 2022 09:04 — 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
@chrisdlees
chrisdlees / deez.revived.user.js
Created April 10, 2023 05:37 — forked from aleandroid/deez.revived.user.js
Deezer Downloader Monkey Script
//---CONFIGURATION---//
const showMp3_128 = true; // Show MP3 @128k download (default: true)
const showMp3_320 = true; // Show MP3 @320k download (default: true)
const showFLAC = true; // Show FLAC download (default: true)
const showAzLyrics = true; // Show azLyrics checkbox (default: true)
const showListDownloader = true; // Show bulk download option (default: true)
const coverSize = 600; // JPEG cover size in px (default: 600)
const coverQuality = 80; // JPEG cover quality from 0 to 100 (default: 80)
//---DEBUG---//