Skip to content

Instantly share code, notes, and snippets.

View TituxMetal's full-sized avatar
🎯
Focusing

Titux Metal TituxMetal

🎯
Focusing
View GitHub Profile
<title>Welcome file</title> <style type="text/css"> .app--dark {

Welcome to StackEdit+!

Hi! I'm your first Markdown file in StackEdit+ . If you want to learn about StackEdit+, you can read me. If you want to play with Markdown, you can edit me. Once you have finished with me, you can create new files by opening the file explorer on the left corner of the navigation bar.

Files

StackEdit+ stores your files in your browser, which means all your files are automatically saved locally and are accessible offline!

Create files and folders

@TituxMetal
TituxMetal / slugify.js
Last active January 15, 2022 17:28
A slugify function in javascript. inspired from https://gist.github.com/codeguy/6684588#gistcomment-3361909
const slugify = (string, separator = '-') =>
string
.toString() // Cast to string
.normalize('NFD') // split an accented letter in the base letter
.replace(/[\u0300-\u036f]/g, '') // remove all previously split accents
.toLowerCase() // Convert the string to lowercase letters
.trim() // Remove whitespace from both sides of a string
.replace(/\s+/g, separator) // Replace spaces with the separator
.replace(/[^\w-]+/g, '') // Remove all non-word chars
.replace(/--+/g, separator) // Replace multiple - with single the separator
@TituxMetal
TituxMetal / create-express-api-project
Last active January 16, 2022 06:50
Creates fullstack project
mkdir -p src/{config,controllers,database,middlewares,models,routes,services,utils,validation}
touch .gitignore .env example.env .eslintrc .babelrc .prettierrc README.md src/{app.js,index.js}
yarn init -y
yarn add @babel/cli @babel/core @babel/plugin-transform-runtime @babel/preset-env @lgdweb/common-express-helpers babel-plugin-module-resolver bcryptjs body-parser cors express express-async-errors express-validator http-errors mongoose
yarn add --dev babel-watch env-cmd eslint eslint-config-kentcdodds@^19.2.0 eslint-config-prettier eslint-import-resolver-alias prettier
@TituxMetal
TituxMetal / aliceStartUp.sh
Last active October 5, 2021 06:53
Setup all tools for making ALICE Iso
#!/bin/bash
# Name: aliceStartUp.sh
# Description: Setup all tools for making ALICE Iso
# Author: Titux Metal <tituxmetal[at]lgdweb[dot]fr>
# Url: https://gist.github.com/TituxMetal/ae8247604227352fb082153acc0ad485
# Version: 1.0
# Revision: 2021.09.15
# License: MIT License
@TituxMetal
TituxMetal / gpg-ssh-setup.md
Created February 2, 2021 00:02 — forked from mcattarinussi/gpg-ssh-setup.md
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.

@TituxMetal
TituxMetal / .babelrc
Last active August 4, 2019 07:55
Basic Next fullstack app with styled components support
{
"presets": [
"next/babel"
],
"plugins": [
[
"styled-components",
{
"ssr": true,
"displayName": true,
@TituxMetal
TituxMetal / config
Last active June 2, 2019 13:41
i3 configuration
################ Disable screensaver on startup#############################
exec --no-startup-id xset s off
exec --no-startup-id xset -dpms
##################### Mod key CMD ##########################################
set $mod Mod4
#################### Triple Screen settings ##################################
set $screen1 DVI-I-1
set $screen2 DVI-D-1
@TituxMetal
TituxMetal / sources.list
Last active June 16, 2022 09:26
Sources List
deb http://debian.mirrors.ovh.net/debian/ bullseye main contrib non-free
deb-src http://debian.mirrors.ovh.net/debian/ bullseye main contrib non-free
deb http://security.debian.org/ bullseye/updates main contrib non-free
deb-src http://security.debian.org/ bullseye/updates main contrib non-free
# bullseye-updates, previously known as 'volatile'
deb http://debian.mirrors.ovh.net/debian/ bullseye-updates main contrib non-free
deb-src http://debian.mirrors.ovh.net/debian/ bullseye-updates main contrib non-free
@TituxMetal
TituxMetal / .xmodmap
Created June 1, 2019 14:30
Apple Keyboard
keycode 49 = less greater less greater VoidSymbol VoidSymbol
keycode 94 = at numbersign at numbersign periodcentered Ydiaeresis