Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ljahier's full-sized avatar
🏡
Working from home

Lucas JAHIER ljahier

🏡
Working from home
View GitHub Profile
@ljahier
ljahier / gist:9532f560a21efb010a90fefe9af8f98e
Last active April 2, 2024 05:14
Report on scans of 163/177 official docker hub images https://github.com/ljahier/xz-docker-scanner
Image: scratch - Error: error pulling image: Error response from daemon: 'scratch' is a reserved name
Image: elasticsearch - Error: error pulling image: Error response from daemon: manifest for elasticsearch:latest not found: manifest unknown: manifest unknown
Image: docker-dev - Error: error pulling image: Error response from daemon: manifest for docker-dev:latest not found: manifest unknown: manifest unknown
Image: dcl2020 - Error: error pulling image: Error response from daemon: pull access denied for dcl2020, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Image: aerospike - Error: error pulling image: Error response from daemon: manifest for aerospike:latest not found: manifest unknown: manifest unknown
Image: jenkins - Error: error pulling image: Error response from daemon: manifest for jenkins:latest not found: manifest unknown: manifest unknown
Image: kibana - Error: error pulling image: Error response from daemon: manifest for kibana:latest
@ljahier
ljahier / default.json
Created January 15, 2024 16:36
iTerm 2 with a touch of sweetness
{
"Working Directory" : "\/Users\/ljahier",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
"Red Component" : 0.81214714050292969,
"Color Space" : "Calibrated",
"Blue Component" : 0.89225924015045166,
"Alpha Component" : 1,
"Green Component" : 0.83857882022857666
},
@ljahier
ljahier / .sh
Created September 6, 2023 12:46
When trackpad stop working properly
sudo killall SystemUIServer
@ljahier
ljahier / tinder-auto-like.js
Created August 13, 2023 18:32
Tinder Auto Like
class TinderAutoLike {
likeBtn;
dislikeBtn;
intervalBetweenClick = 1000;
setIntervalId;
gamePad;
constructor() {
this.gamePad = document.getElementsByClassName('recsCardboard__cards')[0].children;
}
@ljahier
ljahier / app.js
Last active November 5, 2022 01:18
Move all photos from google takeout into one directory.
const { mkdir, readdir, rename, stat } = require('fs/promises');
async function main() {
try {
await mkdir('./photos')
console.debug('Photo directory successfully created');
} catch (err) {
console.debug('Photo directory already exist');
}

Scope and steps for user system ticket - PX-4

Proposed steps to develop the ticket:

  1. Add new table to the main db users table, with needed columns (id, email, password, first_name, last_name, restore_key, created_at, updated_at)
  2. Add a migration for the columns mentioned above
  3. Tests the migration on local and also record the time it takes to run locally.
  4. Add form to create new user and make persist it in the db table. Password will be encrypted using SHA512.
  5. Do basic validation like required
  6. Enhance validation to accept only email in email field, accept only alphabets (not numbers) for first name and last name.
@ljahier
ljahier / emacs_cheatsheet.md
Created September 5, 2020 01:24 — forked from cairesr/emacs_cheatsheet.md
Emacs Cheat Sheet for macOS

Basics

ctrl + g - quit any Emacs command

crtl-x b - new buffer

crtl-x k - kill buffer

ctrl-x Ctrl-f - find / create new file na

@ljahier
ljahier / index.js
Created June 18, 2020 00:10
NodeJS Auth with JWT
const express = require('express');
const app = express();
const bcrypt = require('bcrypt');
const jwt = require('jsonwebtoken')
require('dotenv').config();
const user = {
id: 1,
email: 'public@example.com',
password: '$2b$10$YjiNp8gnJRqTQ5o8epBwFuX9fE3usawPkEZ0ZknnVs5YeSy53eW6e',
@ljahier
ljahier / gist:23156a7765dd4abfe31ff35737ccc3b0
Created January 22, 2020 16:54
docker fedora epitest with perso settings
docker run -d -it --name fedora -v ~/.ssh/:/root/.ssh/ -v ~/.gitconfig:/root/.gitconfig -v ~/delivery:/delivery -v ~/norminette:/norminette fedora
const SHA256 = require("crypto-js/sha256")
const fs = require("fs")
// Une transaction est l'achat ou la vente de notre crypto
class Transaction {
// Le constructeur est la pour quand on initialise une nouvelle instance
// de la classe transaction on peu directement lui passer des parametres
constructor(index, timestamp, data, previousHash = '') {
this.index = index
this.timestamp = timestamp