This file contains 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
#first we create a subclass of class string | |
class MyString < String | |
end | |
MyString.new | |
# => "" | |
#now we are going to override this method by some Ruby magic | |
MyString.class_eval do | |
def empty? |
This file contains 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
function create() { | |
this.add.text(50, 100, "Coby Blue's\n Adventure World", { | |
font: "40px Times New Roman", | |
fill: "#ffa0d0", | |
}); | |
// Change "by Codecademy" to your name! | |
this.add.text(130, 300, "by BigRed, CodeMonkey", { | |
font: "20px Times New Roman", | |
fill: "#ffa0d0", |
This file contains 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
export function addGameOverLayer() { | |
Properties.gamepad.on('down', (pad, btn, value) => { | |
console.log({ | |
pad, | |
btn, | |
value | |
}); | |
if (pad == 9) { | |
restartGame() |
This file contains 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
- developer mode (hold ESC, refresh, and power buttons till insert USB screen comes up, then hit CTRL + D) | |
- download crouton | |
sudo sh ~/Downloads/crouton -t xiwi -n code-oss-chroot | |
sudo enter-chroot -n code-oss-chroot sudo -S sh -c "$( curl -s https://code.headmelted.com/installers/apt.sh )" | |
(if "unauthenticated packages" error:) | |
sudo enter-chroot -n code-oss-chroot sudo -S sh -c "$( curl -s https://gist.githubusercontent.com/easierbycode/ea16d448e32608abfb35589399bb4b10/raw/c98815b6a9ad3cabcf99f90a66fa1391f97f940a/apt.sh )" | |
sudo echo "alias code=\"sudo startxiwi -n code-oss-chroot code-oss\"" >> ~/.bashrc |
This file contains 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
.three{ | |
height: 33vh; | |
} | |
.three p{ | |
position: relative; | |
top: 50%; | |
-webkit-transform: translateY(-50%); | |
-ms-transform: translateY(-50%); | |
transform: translateY(-50%); | |
} |
This file contains 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
const MAX_PLAYERS = 4; | |
const haveEvents = 'ongamepadconnected' in window; | |
const controllers = {}; | |
// D-PAD AND BUTTONS | |
// (U, D, L, R, B, A, START) | |
const buttons = { | |
U : 12, | |
D : 13, | |
L : 14, | |
R : 15, |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
This file contains 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
Width Height Standard Divisible by 8 | |
16 9 | |
32 18 | |
48 27 | |
64 36 | |
80 45 | |
96 54 | |
112 63 | |
128 72 Yes | |
144 81 |
This file contains 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
@font-face { | |
font-family: 'Bangers'; | |
font-style: normal; | |
font-weight: normal; | |
font-display: swap; | |
/* src: local('Bangers Regular'), local('Bangers-Regular'), url(https://fonts.gstatic.com/s/bangers/v12/FeVQS0BTqb0h60ACH55Q2A.woff2) format('woff2'); | |
src: url('data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAFNQABIAAAAAv1gAAFLmAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGiobtyochDAGYACDYghqCZoWEQgKgocYgeN6C4NcAAE2AiQDhxgEIAWFbgeGJQyBGBugqjV4k1MrtwNzv6B+5lEIbBxAiLAnPQrJJme77P8/J7kYw4AanGpWbf8b2ZyKNFqooxB0V1GGOZi90Fts1IFChexgyXND0UV3WVrasH6E0eR1LHg+qLKy1Z0Ie4fbYtDzrmvQZ/vy9pNONvd91t9CRAxz2Gwd5b3/2XwI0xRGs/q2vMbv+97BL9Iw/GOjl3EhGGIGwTTNd6vjYWPKhaFvXgS400PK0NOHp1Pf/3e5XFgqc6F0Urp0lZTUM9IOdgcrg5gBWpv/fNVdfzT8Q//zDxL1kcTzPpECT0qURDpAaBUJAxvdsNjEWlgb5qJklTIX6XS6ds76V/f+zM7ulYAXJeEUk2Q54IbDTxgnPu5y6YMTZfFKE1Vj9Z/VPQvx1GeQJDwhKcDwpL4isghCoyInrofWLGcWQktDy5BN+JPNHc8DgXoFlRWmFa5K3rGXbf9/8P7+vzr77n2SHAYnGXIcUGgA0PMJtMQV0OmBu4r7X9WLRbXHbOXQDi278MfHz+uk71Mnre2pwpn4T3OvRtXVVchJZE3giOT8/CQqRsX0 |
NewerOlder