Skip to content

Instantly share code, notes, and snippets.

Johnny Coder


1 MyAddress email@example.com MyTown 1000 @twitter_handle MyCountry 1800 my-phone-nr


Education

@Absolutestunna
Absolutestunna / resume.md
Last active July 21, 2023 22:58
Front-End Dev resume

Joshua Abu

Charlotte, NC | joshujah007@gmail.com | 914-356-9250 | joshujah.com

Experience

Project Coordinator (EPIC Technical Dress Rehearsal Support); 2015 - Greenville, SC

@Absolutestunna
Absolutestunna / github.io
Created January 29, 2016 22:11
Caeser's Cipher using ROT13 method
function rot13(str) { // LBH QVQ VG!
//Created two functions to replace each letter with its partner letter
var upDown = function(num) {
var upLet = num.charCodeAt(0);
var upNum = upLet += 13;
return String.fromCharCode(upLet);
};
var downUp = function(num) {
@Absolutestunna
Absolutestunna / github.io
Created January 29, 2016 00:26
Where do I belong
function where(arr, num) {
// Find my place in this sorted array.
arr.push(num);
arr.sort(function(a, b){
return a-b;
});
return arr.indexOf(num);
}
@Absolutestunna
Absolutestunna / github.io
Created January 28, 2016 22:08
Falsy Bouncer
function bouncer(arr) {
// Don't show a false ID to this bouncer.
var items = arr.filter(function(value){ //filter method creates new method with the parameter that evaluates to be true.
return value;
});
return items;
}
bouncer([7, "ate", "", false, 9]);
@Absolutestunna
Absolutestunna / Slasher Flick
Created January 28, 2016 22:04
Absolutestunna/github.io
function slasher(arr, howMany) {
var removed = arr.splice(0, howMany);
return arr;
}
slasher([1, 2, 3], 4);
@Absolutestunna
Absolutestunna / github.io
Created November 9, 2015 23:09
Everything Be True
function every(collection, pre) {
var counter = 0;
for (var i=0; i<collection.length; i++){
//Evaluate to see if the collection property value exists, if it does, we assume the property exists also.
if (collection[i][pre]){
counter++;
}
}
//Check to see if the amount of true elements equals the amount total length of the elements.
@Absolutestunna
Absolutestunna / github.io
Created November 9, 2015 21:36
Convert HTML elements
function convert(str) {
var split = str.split('');
for (var i=0; i<split.length; i++) {
switch(split[i]) {
case '<':
split[i] = '&lt;';
break;
case '&':
@Absolutestunna
Absolutestunna / github.io
Created November 9, 2015 20:39
Spinal Tap Case
function spinalCase(str) {
// "It's such a fine line between stupid, and clever."
// --David St. Hubbins
//Declare the variable to hold the underscore and single space matches
var regex = /[\W_]/g;
//Declare a variable to hold the lowercase_uppercase match. Line 10 puts a space between the found match(combo)
var caseMatch = /([a-z])([A-Z])/g;
var new_str = str.replace(caseMatch, "$1 $2");