Skip to content

Instantly share code, notes, and snippets.

View raphael-brand's full-sized avatar
🏠
Working from home

Raphael raphael-brand

🏠
Working from home
View GitHub Profile
@raphael-brand
raphael-brand / git-hook-add-copyright-to-modified-file.sh
Last active April 7, 2023 10:08
Git Hook - "pre commit" - Add Copyright To Modified File
@raphael-brand
raphael-brand / main.rs
Created April 5, 2023 17:06
Tide Web Application - main file
use async_std::path::PathBuf;
use simple_tmpl_lib::TemplateEngine;
use tide::prelude::json;
use tide::Response;
use tide::StatusCode;
#[derive(Debug, serde::Serialize)]
struct MyError {
message: String,
}
@raphael-brand
raphael-brand / rust-tools.md
Created March 30, 2023 15:32
Rust - recommendations
@raphael-brand
raphael-brand / rock-paper-scissor.rs
Created March 9, 2023 18:52
Rust - Rock Paper Scissors
let result = vec![
("paper", "paper"),
("paper", "scissor"),
("paper", "stone"),
("scissor", "paper"),
("scissor", "scissor"),
("scissor", "stone"),
("stone", "paper"),
("stone", "scissor"),
("stone", "stone"),
@raphael-brand
raphael-brand / rock-paper-scissors.sql.md
Created March 9, 2023 18:49
Rock Paper Scissors - Schere Stein Papier Cross Join SQL

[SQL Fiddle][1]

MySQL 5.6 Schema Setup:

CREATE TABLE symbols (
  symbol CHAR(12)
);

INSERT INTO symbols (symbol) VALUES

('rock'),

@raphael-brand
raphael-brand / package.json
Created March 26, 2021 15:58
Node.js Typescript Config
{
"name": "sandbox",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "tsc && node dist/index.js",
"dev": "nodemon --watch 'src/**/*.ts' --exec 'ts-node' src/index.ts",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
@raphael-brand
raphael-brand / tsconfig.json
Created March 26, 2021 15:48
Node.js Typescript Configuration
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"rootDir": "src",
"outDir": "dist",
"sourceMap": true,
"resolveJsonModule": true,
"lib": ["es6", "dom"],
"esModuleInterop": true

Keybase proof

I hereby claim:

  • I am raphael-brand on github.
  • I am raphaelbrand (https://keybase.io/raphaelbrand) on keybase.
  • I have a public key ASDdKJ_gWUk63rqCEs8mAaAcn0ycxatiVmpON-2iwLhSNQo

To claim this, I am signing this object:

@raphael-brand
raphael-brand / react-graphql-scribble.jsx
Last active March 6, 2020 10:44
React.js and GraphQL
@graphql(gql`
query {
todos {
title
date
}
}
`);
class Todos extends Component {
@raphael-brand
raphael-brand / canvas-pacman-alike-playfield-work-in-progress.markdown
Last active July 19, 2017 21:13
Canvas - Pacman-alike-playfield (work-in-progress)

Canvas - Pacman-alike-playfield (work-in-progress)

open your console, to see how the current position in the map is updated, when you accelerate with the cursor keys

A Pen by Raphael on CodePen.

License.