Skip to content

Instantly share code, notes, and snippets.

View SakiiR's full-sized avatar
🎯
Focusing

SakiiR SakiiR

🎯
Focusing
View GitHub Profile
@SakiiR
SakiiR / challenge.c
Created April 29, 2017 10:53
Spanky challenge
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <stdlib.h>
unsigned char buf[40960];
#define TARGET_FILE "/f1"
int main(int argc, char *argv[])
{
unsigned char *code = 0;
@SakiiR
SakiiR / fish_prompt.fish
Created July 17, 2017 15:11
Fish Prompt, BASE THEME: shellder
# Set these options in your config.fish (if you want to :])
#
# set -g theme_display_user yes
# set -g theme_hostname never
# set -g theme_hostname always
# set -g default_user your_normal_user
# Backward compatibility
@SakiiR
SakiiR / aes.py
Created October 3, 2017 15:57
AES with python from stackoverflow
import base64
import hashlib
from Crypto import Random
from Crypto.Cipher import AES
class AESCipher(object):
def __init__(self, key):
self.bs = 32
self.key = hashlib.sha256(key.encode()).digest()
@SakiiR
SakiiR / parse_ls.py
Last active October 18, 2017 13:31
Parse la sortie d'un ls /s Windows.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
CODEC = "latin-1"
def process(lines):
current_dir = None
filepaths = []
@SakiiR
SakiiR / powerx.cpp
Created November 1, 2017 15:49
C++ Power
double powerx(1.0);
for (int i(0); i <= N; ++i) // ON VA SEPARER LA SOMME EN DEUX PUISQUE CELLE CI CONVERGE
{
if (i%2 != 0) {
cos_x -= powerx / factorielle(2*i); [URL]//SI[/URL] I EST IMPAIR ON SOUSTRAIT
}
else {
cos_x += powerx / factorielle(2*i); // SI I EST PAIR ON ADDITIONNE
}
@SakiiR
SakiiR / demo.md
Last active November 13, 2017 20:56
Démonstration DFA

Demo DFA BACK

Dépot Dev / Prod

  • Un dépot prévu pour le déploiement de toutes les applications (FRONT, DSL et BACK)
  • Fichier de configuration pour tout les dépots (config.py pour les dépots back)

Docker compose production

@SakiiR
SakiiR / instructions.lst.c
Created February 11, 2018 09:22
GameBoy instructions list
#include "instructions.h"
const t_instruction g_instructions[] = {
/* 3.3.1 - 8 Bits Loads */
/* 1. LD nn, n */
/* Description: Put value nn into n */
/* Use with: */
/* nn = B,C,D,E,H,L,BC,DE,HL,SP */
/* n = 8 bit immediate value */
@SakiiR
SakiiR / mcarlo.c
Created February 13, 2018 09:05
Threads / Mutex -> Monte-Carlo
/**
* Monte Carlo - Threads exercise
*
* Compile with: gcc ./mcarlo.c -o mcarlo -lpthread -lm
*/
#include <unistd.h>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@SakiiR
SakiiR / virtual.fish
Last active January 8, 2022 16:52
Prompt VirtualEnv Fish
function prompt_virtual_env -d "Display Python virtual environment"
if test "$VIRTUAL_ENV"
prompt_segment white black (eval (echo $VIRTUAL_ENV/bin/python --version) 2>&1 | sed 's/Python /Py|/g')
end
end
@SakiiR
SakiiR / autorun.cc
Created August 31, 2018 19:55
Autorun Dayz
// ToggleRun.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <Windows.h>
int main()
{
bool activated = true;