Skip to content

Instantly share code, notes, and snippets.

/* eslint-disable */
String.prototype.sarcastic = function() {
return [...this]
.map((char, i) => char[`to${i % 2 ? 'Upper' : 'Lower'}Case`]())
.join('');
};
// this is a big array of 76 items I need to split into groups of 10
const hugeArray = Array.from({ length: 76 }, (_, i) => i);
function chunkify(array, chunkSize = 10) {
// make a new array
const chunks = Array.from(
// give it however many slots are needed - in our case 8
// 1-7 with 10 items, and 8th slot will have 6
{ length: Math.ceil(array.length / chunkSize) },
// this is a map function that will fill up our slots
@douglascayers
douglascayers / tasks.json
Last active January 30, 2024 22:27
Simple tasks for Visual Studio Code to deploy/retrieve/delete the currently opened file, or an entire folder, using Salesforce CLI force:source commands.
{
"version": "2.0.0",
"tasks": [
{
"label": "SFDX: Deploy Current File",
"type": "shell",
"command": "sfdx",
"args": [
"force:source:deploy",
"--sourcepath",
// 1. Visit a news website like cnn.com
// 2. paste this into your console
setInterval(() =>
document.querySelectorAll('p,img,a,button,h1,h2,h3,span')
.forEach(x=>x.style=`transform:rotate(${Math.random()*777}deg) scale(${Math.random()* 3}); transition:all .5s`)
, 500);
// 3. feel a lil bit better 😘