class Pizza {
constructor(ingredients) {
this.ingredients = ingredients;
}
// is this thing in the pizza a topping?
isTopping(topping){
let newPizza = new Pizza(this.ingredients);
let index = newPizza.ingredients.indexOf(topping);
if (index === -1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* 1. press ctrl + shift + i | |
| * 2. go to "Console" and find any log that starts with "###", click on its link | |
| * 3. pretty print the script | |
| * 4. search for "player.x = " | |
| * 5. put a breakpoint on the same line and move your character with your mouse (game is paused now) | |
| * 6. paste in the script | |
| * 7. remove breakpoint, continue game | |
| * 8. dab on the haters but enjoy knowing the fact you're so salty in a Facebook game that you search for hacks | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {Client, RichEmbed} from 'discord.js' | |
| const client = new Client(); | |
| client.login(process.env['BOT_TOKEN']); | |
| function sendEmbed(ownerURL: string, appId: string){ | |
| return new RichEmbed() | |
| .setAuthor(`⛔ Yikes, you leaked your token! ⛔`) | |
| .setThumbnail(ownerURL) | |
| .setColor('#ff0000') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| class Building: | |
| def __init__(self, world, name, owner, color, _type): | |
| self.name = name | |
| self.owner = owner # Person obj | |
| self.color = color | |
| self.type = _type | |
| self.assign_person(owner) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async def cmd_weather(self, channel, author): | |
| import json | |
| from array import array | |
| import requests | |
| from collections import OrderedDict | |
| from pprint import pprint | |
| api_key = "&APPID=507e30d896f751513350c41899382d89" | |
| city_name_url = "http://api.openweathermap.org/data/2.5/weather?q=" | |
| units = "&units=metric" | |
| global general_info |
NewerOlder