Skip to content

Instantly share code, notes, and snippets.

View ghughes13's full-sized avatar

Garrett ghughes13

View GitHub Profile
@ghughes13
ghughes13 / addeslint.md
Last active April 13, 2021 17:06
How to add eslint
  1. git pull origin master to ensure to update package.json
  2. npm install to install updates to eslint packages
  3. In VS Code, install the ESLint (dbaeumer.vscode-eslint) extension.
  4. Open the command palette => Search for: Preferences: Open Settings(JSON) => add the following options inside the settings object:
"eslint.workingDirectories": [
    {
      "mode": "auto"
    }
 ],
@ghughes13
ghughes13 / AddPrettier.md
Last active April 9, 2021 15:55
How to add Prettier

How to add Prettier

*If you get to a step and something doesn't work, restart VS Code.

  1. Run git pull origin master to ensure the .prettierrc file is in your root folder.
  2. While in the 'vue-honey-crm' directory, run npm install.
  3. In VS Code, Install the "Prettier - Code formatter" extension (esbenp.prettier-vscode).
  4. Open the command palette ( ctrl + shft + p ) => Search for: Format Document With... => Search for: Configure Formatter... => Select Prettier - Code formatter to set it as the default formatter.
  5. Open the command palette => Search for: Preferences: Open Settings(JSON) => add the following options inside the settings object:
    "editor.formatOnSave": true, //Formats on save
@ghughes13
ghughes13 / Mad Libs
Last active June 12, 2016 13:44
Mad Libs Game - Practice
#Mad Libs Game
print ("Mad Libs has started")
#Get words from player
char = input("Enter your name: ")
adjOne = input("Enter an adjective: ")
adjTwo = input("Enter an adjective: ")
adjThree = input("Enter an adjective: ")
verbOne = input("Enter a verb: ")
@ghughes13
ghughes13 / EvenOdd
Created June 5, 2016 21:21
Determines if a number is even or odd. Can Also determine if a number is divisible by another.
number = raw_input("Enter a number: ")
number = int(number)
def evenOdd(number):
if number % 4 == 0:
print "It's an even number AND a multiple of 4!"
elif number % 2 == 0:
print "It's an even number!"
else:
@ghughes13
ghughes13 / Divisible Numbers
Last active June 5, 2016 20:28
Calculates numbers that go into another number up to 100.
num = int(input("Please enter a number: "))
x = range(2, 101)
for i in x:
if num % i == 0:
print i
@ghughes13
ghughes13 / Years Till 100
Created June 5, 2016 17:31
Calculates Years Until You Turn 100
name = str(input("What's your name? "))
age = int(input("What's your age? "))
years = 100 - age
printNum = int(input("How many times do you want to print it? "))
def timesPrint(printNum):
while printNum > 0:
print ("I see that you're " + str(age) + ". That means you'll be 100 in " + str(years) + " years!")
printNum -= 1
@ghughes13
ghughes13 / FizzBuzz
Created June 5, 2016 16:02
FizzBuzz
#####FizzBuss Coded Alone####
for i in range(1,21):
if i % 2 == 0 and i % 5 == 0:
print "FIZZBUZZ"
elif i % 2 == 0:
print "FIZZ"
elif i % 5 == 0:
print "BUZZ"
else: