Skip to content

Instantly share code, notes, and snippets.

View zempo's full-sized avatar

Solomon Zelenko zempo

View GitHub Profile

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@zempo
zempo / __replit_main__
Created December 12, 2018 07:58
validate object keys drill created by zempo1 - https://repl.it/@zempo1/validate-object-keys-drill
// running the function with `objectA` and `expectedKeys`
// should return `true`
const objectA = {
id: 2,
name: 'Jane Doe',
age: 34,
city: 'Chicago',
};
// running the function with `objectB` and `expectedKeys`
@zempo
zempo / __replit_main__
Created December 12, 2018 07:40
find by id drill created by zempo1 - https://repl.it/@zempo1/find-by-id-drill
// you can pass in `scratchData` to test out `findByid`
// your function
const scratchData = [
{ id: 22, foo: 'bar' },
{ id: 28, foo: 'bizz' },
{ id: 19, foo: 'bazz' },
];
function findById(items, idNum) {
return items.find(item => item.id === idNum);
@zempo
zempo / __replit_main__
Created December 12, 2018 07:13
Make student reports drill created by zempo1 - https://repl.it/@zempo1/Make-student-reports-drill
function makeStudentsReport(data) {
let report = [];
for (i = 0; i < data.length; i++) {
let student = data[i];
report.push(`${student.name}: ${student.grade}`);
}
return report;
}
/* From here down, you are not expected to
@zempo
zempo / __replit_main__
Created December 12, 2018 06:41
Looping over collections of objects example created by zempo1 - https://repl.it/@zempo1/Looping-over-collections-of-objects-example
const users = [
{
name: 'Bernard',
age: 29,
birthMonth: 'April',
},
{
name: 'Bernice',
age: 14,
birthMonth: 'December',
@mbejda
mbejda / Industries.csv
Last active July 1, 2024 10:49
Compiled list of industries.
Industry
Accounting
Airlines/Aviation
Alternative Dispute Resolution
Alternative Medicine
Animation
Apparel/Fashion
Architecture/Planning
Arts/Crafts
Automotive
@greyaperez
greyaperez / Most_Useful_Shell.sh
Created December 10, 2013 15:42
Some of the most useful bash/shell functions and aliases.
alias editbash='vim ~/.bashrc'
alias updatebash='source ~/.bashrc'
alias ls='ls -alC --color=auto'
function search (){
egrep -roiI $1 . | sort | uniq
}
function whereis (){
find . -name "$1*";