Skip to content

Instantly share code, notes, and snippets.

View lostsh's full-sized avatar
💾
Probably coding ...

Yohann Vernhes lostsh

💾
Probably coding ...
View GitHub Profile
@lostsh
lostsh / Invoke-SocksProxy.psm1
Created November 6, 2023 16:37
Reverse proxy powershell by p3nt4
<#
.SYNOPSIS
Powershell Socks Proxy
Author: p3nt4 (https://twitter.com/xP3nt4)
License: MIT
.DESCRIPTION
@lostsh
lostsh / pipe.c
Created March 23, 2023 00:01
C99 input from pipe ouput stdout
#include <unistd.h>
/**
* Read input char by char and ouput it.
*/
int main(int argc, char* argv[]){
int read_status = 1;
while(read_status){
char c;
read_status = read(STDIN_FILENO, &c, 1);
@lostsh
lostsh / connectfour.c
Last active December 5, 2022 17:47
ChatGPT generate a connect 4 game
#include <stdio.h>
#include <stdbool.h>
#define ROWS 6
#define COLUMNS 7
// Global variables to keep track of the game state
int board[ROWS][COLUMNS];
bool game_over = false;
int current_player = 1;
@lostsh
lostsh / ip.txt
Last active July 23, 2022 17:42
Ip V4 example
192.168.1.92
@lostsh
lostsh / clock.ino
Last active June 27, 2022 20:54
NodeMCU RTC OLED (128x64 0.96inch I2C)
/**
* Wiring
*
* Component : Arduino
*
* OLED 128x64 - 0.96 I2C
* VCC => 3V3
* GND => GND
* SCL => D1
* SDA => D2
@lostsh
lostsh / .gitignore
Last active June 1, 2022 08:03
This script is requesting a lot of resources from client
index.html
@lostsh
lostsh / main.js
Last active May 31, 2022 12:29
let's do some sketchy things
const interval = setTimeout(redirect, 5000);
function stopTimout() {
clearTimeout(interval);
}
function redirect(){
stopTimout();
console.log("Redirect");
alert(1);
@lostsh
lostsh / README.md
Last active May 31, 2022 18:05
Tuto Git et GitLab

Git

Les commandes principales

Pour synchroniser les branches distante et locale

  • pull : récupère les informations de la branche distante, pour les rapatrier sur la branche locale
  • push : récupère les informations de la branche locale, pour les envoyer sur la branche distante

Pour valider des modifications

  • add [dossier] : permet d'ajouter les modifications courantes
@lostsh
lostsh / parrot.c
Created November 22, 2021 21:31
parrotsay
#include <stdio.h>
void showMessage(int, char**);
void showParrot(int);
size_t strlen(char*);
int main(int argc, char **argv){
if(argc <= 1){
printf("Usage: %s [message]\n", argv[0]);
return -1;