Skip to content

Instantly share code, notes, and snippets.

View pleabargain's full-sized avatar
🏠
office

Dennis pleabargain

🏠
office
View GitHub Profile
@ambergkim
ambergkim / FCCBonfire.js
Created November 18, 2015 21:51
Free Code Camp Bonfire: Mutations
function mutation(arr) {
firstWord = arr[0].toLowerCase();
secondWord = arr[1].toLowerCase().slice('');
lettersFound = 0;
for(i=0; i<secondWord.length; i++){
indexSearch = secondWord[i];
indexSearchResult = firstWord.indexOf(indexSearch, 0);
if(indexSearchResult == -1) {
return false;
} else {
@horstjens
horstjens / moreseeker.py
Created November 24, 2012 21:39
searching strings in files with python 3.2
# to test this , create a file called poem.txt in the same folder as this python file
# make sure there are a lot of "more" in the poem.txt like
poem = """there is more to the world
than Demi Moore and Roger Mooore
It is a good Morning, but more so
a good day to every moron out there,
gimme more, more, moreofit"""
# i assume you are using python3.2 here
# open file as fileoobject f