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
let tank; | |
let bullet; | |
let obstacles = []; | |
let tankImg, bulletImg; | |
let aiTanks = []; | |
// Add constants for the play area size | |
const PLAY_AREA_WIDTH = 1000; | |
const PLAY_AREA_HEIGHT = 1000; |
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
/* | |
Given an array of async functions, execute them in order. | |
*/ | |
// Our async functions array | |
const asynFunctions = [ | |
() => new Promise((resolve) => setTimeout(() => resolve("1"), 200)), | |
() => new Promise((resolve) => setTimeout(() => resolve("2"), 300)), | |
() => new Promise((resolve) => setTimeout(() => resolve("3"), 100)) | |
] |
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 React from "react"; | |
import { useForm } from "react-hook-form"; | |
import { Post, usePostModel } from "../models/post.model"; | |
interface Props { | |
post?: Post; | |
onSubmit?: () => void; | |
} | |
interface PostForm { |
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
use $database$ | |
DELIMITER $$ | |
drop procedure if exists $procedureName$ $$ | |
create procedure $procedureName$() | |
begin | |
declare exit handler for sqlexception | |
begin | |
get diagnostics condition 1 @sqlstate = returned_sqlstate , @errno = mysql_errno , @text = message_text ; | |
set @full_error = concat('ERROR ', @errno, @`sqlstate`, @text); |
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
# change apache's php | |
a2dismod php7.2 | |
a2enmod php5.6 | |
service apache2 restart | |
# change system's php | |
update-alternatives --set php /usr/bin/php5.6 | |
update-alternatives --set phar /usr/bin/phar5.6 | |
update-alternatives --set phar.phar /usr/bin/phar.phar5.6 | |
update-alternatives --set phpize /usr/bin/phpize5.6 |
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
# change apache's php | |
a2dismod php5.6 | |
a2enmod php7.2 | |
service apache2 restart | |
# change system's php | |
update-alternatives --set php /usr/bin/php7.2 | |
update-alternatives --set phar /usr/bin/phar7.2 | |
update-alternatives --set phar.phar /usr/bin/phar.phar7.2 | |
update-alternatives --set phpize /usr/bin/phpize7.2 |
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
const gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
const concat = require('gulp-concat'); | |
const uglify = require('gulp-uglify-es').default; | |
const rename = require('gulp-rename'); | |
var sass = require('gulp-sass'); | |
let cleanCss = require('gulp-clean-css'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
const vendorJs = [ |
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
#!/usr/sh | |
sudo service docker stop && sudo apt-get purge -y docker-ce && sudo apt-get autoremove --purge -y docker-ce && sudo rm -rf /var/lib/docker && sudo apt-get update && sudo apt-get install -y docker-ce && sudo service docker start && sudo docker run hello-world && sudo usermod -aG docker $USER |