Skip to content

Instantly share code, notes, and snippets.

View jsmayo's full-sized avatar
👨‍💻

Jesse jsmayo

👨‍💻
View GitHub Profile
@jsmayo
jsmayo / JS_TitleCaseSentences.txt
Created July 21, 2017 14:54
Title Case a Sentence W/ JS:
Examples:
------------------------------------------------------------
Split and loop method:
------------------------------------------------------------
function titleCase(str) {
var newstr = str.split(" ");
for(i=0;i<newstr.length;i++){
if(newstr[i] == "") continue;
var copy = newstr[i].substring(1).toLowerCase();
@jsmayo
jsmayo / rot13Cipher.txt
Last active July 26, 2017 22:21
Caesars Cipher
One of the simplest and most widely known ciphers is a Caesar cipher, also known as a shift cipher. In a shift cipher the meanings of the letters are shifted by some set amount.
A common modern use is the ROT13 cipher, where the values of the letters are shifted by 13 places. Thus 'A' ↔ 'N', 'B' ↔ 'O' and so on.
A ROT13 encoded string takes user input and returns a decoded strings in the following
* All letters will be uppercase.
* Do not transform any non-alphabetic character (i.e. spaces, punctuation), but do pass them on.
* Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code.
String.prototype.charCodeAt()
@jsmayo
jsmayo / inverseArray.js
Created December 1, 2017 11:38
AoC - Day 1:
const captcha = "29917128875332952564321392569634257121244516819997569284938677239676779378822158323549832814412597817651244117851771257438674567254146559419528411463781241159837576747416543451994579655175322397355255587935456185669334559882554936642122347526466965746273596321419312386992922582836979771421518356285534285825212798113159911272923448284681544657616654285632235958355867722479252256292311384799669645293812691169936746744856227797779513997329663235176153745581296191298956836998758194274865327383988992499115472925731787228592624911829221985925935268785757854569131538763133427434848767475989173579655375125972435359317237712667658828722623837448758528395981635746922144957695238318954845799697142491972626942976788997427135797297649149849739186827185775786254552866371729489943881272817466129271912247236569141713377483469323737384967871876982476485658337183881519295728697121462266226452265259877781881868585356333494916519693683238733823362353424927852348119426673294798416314637799636344448941782774113142
/*
ORIGINAL OO CODE:
var Vehicle = function (x, y, speed) {
this.x = x;
this.y = y;
this.speed = speed;
};
Vehicle.prototype.move = function() {
this.x = this.x + this.speed * this.randomStep();
@jsmayo
jsmayo / index.html
Created January 23, 2018 00:39
Translations S2. L15
<p></p>
<p class="move-right"></p>
<p></p>
<p class="move-down"></p>
@jsmayo
jsmayo / index.html
Created January 23, 2018 08:02
Transition Demo S2.L19
<p class="box">NO TRANSITION</p>
<p class="animated box">TRANSITION</p>
<p class="crazy box">CRAZINESS</p>
@jsmayo
jsmayo / index.html
Created January 23, 2018 08:31
Transition Playground S2.L20
<p class="box">BORING</p>
<p class="animated box">ANIMATED</p>
@jsmayo
jsmayo / html5-tags.markdown
Created January 24, 2018 07:16
HTML5 Tags
@jsmayo
jsmayo / animated-gallery-starter.markdown
Created January 24, 2018 16:38
Animated Gallery Starter
@jsmayo
jsmayo / index.html
Created January 24, 2018 22:30
ugly keyframe rainbow text
<p>HELLO!</p>
<p>HELLO!</p>