Skip to content

Instantly share code, notes, and snippets.

@sen0rxol0
sen0rxol0 / messages.json
Last active January 28, 2024 23:33
JSON data for testing sms phone number verification
[
{"phoneNumber": "+33751288664", "message": "Your verification code is: 1234"}
]
@sen0rxol0
sen0rxol0 / mountfs.c
Created July 3, 2023 10:25
SSH ramdisk mount filesystems in 64bit iOS devices, sep devices
/* compile with: xcrun -sdk iphoneos clang -arch arm64 -Wall -o ./mountfs ./mountfs.c */
#include <stdio.h>
#include <sys/wait.h>
#include <spawn.h>
#include <unistd.h>
/*
if [[ $(/System/Library/Filesystems/apfs.fs/apfs.util -p /dev/disk0s1s3) == 'Preboot' ]]; then \n\
/sbin/mount_apfs /dev/disk0s1s3 /mnt6 \n\
fi \n\
@sen0rxol0
sen0rxol0 / ipad4doulci.sh
Last active July 3, 2023 10:32
iPad4 Activation Lock Bypass
#!/usr/bin/env bash
clear
cat <<EOF
----iPad 4th generation Activation Lock Bypass script----
made by @sen0rxol0
------------------------------------------------
----Credits----
u/johnponflanchan and @appletech752
@sen0rxol0
sen0rxol0 / usbmux.js
Last active August 11, 2022 23:46
usbmuxd listen for device
// Modified from source: https://github.com/DeMille/node-usbmux/blob/master/lib/usbmux.js
const net = require('net'),
usbmuxd = { path: '/var/run/usbmuxd' }
devices = {},
protocol = {
payloadListen: `
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
@sen0rxol0
sen0rxol0 / generate_icns.sh
Created June 20, 2022 13:52
create icns files using iconutil
#!/usr/bin/env bash
mkdir Icon.iconset
sips -z 16 16 [email protected] --out Icon.iconset/icon_16x16.png
sips -z 32 32 [email protected] --out Icon.iconset/[email protected]
sips -z 32 32 [email protected] --out Icon.iconset/icon_32x32.png
sips -z 64 64 [email protected] --out Icon.iconset/[email protected]
sips -z 128 128 [email protected] --out Icon.iconset/icon_128x128.png
sips -z 256 256 [email protected] --out Icon.iconset/[email protected]
sips -z 256 256 [email protected] --out Icon.iconset/icon_256x256.png
@sen0rxol0
sen0rxol0 / readme.md
Last active January 25, 2022 09:58
La JSTL

JSTL (JavaServer Pages Standard Tag Library)

Liens utiles

JSTL JSR JSTL Core

SOMMAIRE

  • catch Catches any Throwable that occurs in its body and optionally exposes it.
  • choose Simple conditional tag that establishes a context for mutually exclusive conditional operations, marked by <when> and <otherwise>
  • if Simple conditional tag, which evalutes its body if the supplied condition is true and optionally exposes a Boolean scripting variable representing the evaluation of this condition import Retrieves an absolute or relative URL and exposes its contents to either the page, a String in 'var', or a Reader in 'varReader'.
  • forEach The basic iteration tag, accepting many different collection types and supporting subsetting and other functionality
@sen0rxol0
sen0rxol0 / media-queries.css
Last active December 31, 2021 08:58
Média queries
@media only screen and (min-width: 360px) {} /* "only screen" afin d\'Améliorer la compatibilité avec les anciens navigateurs */
@media (max-width: 360px) {} /* Appliquer des styles à condition que la largeur du viewport soit inférieure à 360px */
@media (min-width: 360px) {} /* Appliquer des styles à condition que la largeur du viewport soit au moins (ou plus de) 360px */
/****************
* LES BREAKPOINTS
****************/
@media (min-width: 359px) {}
@media (min-width: 399px) {}
@sen0rxol0
sen0rxol0 / reset.css
Last active March 19, 2021 08:06
Minimal CSS reset
:root {
box-sizing: border-box;
font-size: 16px;
}
*, *::before, *::after {
box-sizing: inherit;
}
body, h1, h2, h3, h4, h5, h6, p, ol, ul {
@sen0rxol0
sen0rxol0 / readme.md
Last active March 3, 2021 15:03
Serveur web facile sur macOS avec PHP

Serveur web locale facile sur macOS avec PHP

Étape 1 ==> Installer Homebrew

Allez sur le site https://brew.sh/ et suivez les instructions.

Étape 2 ==> Installation de PHP

Suite a l'installation d'Homebrew tapez la commande brew install php sur votre terminal et patientez.

Étape 3 ==> Lancer un serveur sur localhost

En terminal, parcourez vos dossiers jusqu'au dossier où vous gardez votre projet et tapez la commande php -S localhost:5500

@sen0rxol0
sen0rxol0 / nginx-tuning.md
Created June 30, 2020 10:51 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.