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
import express, { Response, Request } from 'express'; | |
import fs from 'fs'; | |
import { IRouterSettings } from './interfaces/IRouterSettings'; | |
import Logger from './utils/logger'; | |
const router = express.Router(); | |
// loop through all the routes | |
const controllersPath = `${__dirname}/controllers`; | |
const controllers = fs.readdirSync(controllersPath); |
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
// SPDX-License-Identifier: MIT | |
// Amended by HashLips | |
/** | |
!Disclaimer! | |
These contracts have been used to create tutorials, | |
and was created for the purpose to teach people | |
how to create smart contracts on the blockchain. | |
please review this code on your own before using any of | |
the following code for production. |
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
import { PrismaClient } from '@prisma/client'; | |
declare global { | |
// allow global `var` declarations | |
// eslint-disable-next-line no-var | |
var prisma: PrismaClient | undefined; | |
} | |
export const prisma = | |
global.prisma || |
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
extends Area2D | |
export var speed = 400.0 | |
var screen_size = Vector2.ZERO | |
# Called when the node enters the scene tree for the first time. | |
func _ready(): | |
screen_size = get_viewport_rect().size | |
print(screen_size) |
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
func _process(delta): | |
var direction = Vector2.ZERO | |
if Input.is_action_pressed("move_right"): | |
direction.x += 1 | |
if Input.is_action_pressed("move_left"): | |
direction.x -= 1 | |
if Input.is_action_pressed("move_down"): | |
direction.y += 1 | |
if Input.is_action_pressed("move_up"): | |
direction.y -= 1 |
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
var screen_size = Vector2.ZERO | |
# Called when the node enters the scene tree for the first time. | |
func _ready(): | |
screen_size = get_viewport_rect().size | |
print(screen_size) |
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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
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
#!/bin/bash | |
## Colors for cli output messages | |
ERROR=`tput setaf 1` | |
SUCCESS=`tput setaf 2` | |
PC=`tput setaf 3` | |
NC=`tput sgr0` | |
## Available choices on args | |
## You can create as many project as you like for choices |
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 getDuration = file => { | |
return new Promise((resolve, reject) => { | |
let videoElement = document.createElement("video"); | |
videoElement.preload = "metadata"; | |
videoElement.onloadedmetadata = function() { | |
window.URL.revokeObjectURL(videoElement.src); | |
resolve(videoElement.duration); | |
}; |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1489770487230", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "arn user" | |
}, | |
"Action": [ |
NewerOlder