Skip to content

Instantly share code, notes, and snippets.

View tibo's full-sized avatar

Thibaut LE LEVIER tibo

View GitHub Profile
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
#!/usr/bin/python3
# -*-coding:Utf-8 -*
"""
water.py
========
Description
-----------
Script pour récupérer des renseignements utiles au brassage sur l'eau du réseau public, et les plus récents possibles, à partir du site du ministère de la santé : "https://orobnat.sante.gouv.fr".
@steipete
steipete / ios-xcode-device-support.sh
Last active December 12, 2023 03:36
Using iOS 15 devices with Xcode 12.5 (instead of Xcode 13)
# The trick is to link the DeviceSupport folder from the beta to the stable version.
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
# (A similar approach works for older versions too, just change the version number after DeviceSupport)
@barosl
barosl / add.c
Created July 26, 2015 07:26
Function overloading in C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int addi(int a, int b) {
return a + b;
}
char *adds(char *a, char *b) {
char *res = malloc(strlen(a) + strlen(b) + 1);
@adrienjoly
adrienjoly / startup-noob-guide.md
Last active March 31, 2024 04:37
Startup Noob Guide: Tips and resources on how to test, develop your startup idea, or find a developer/associate/CTO

Startup Noob Guide (bit.ly/startupnoob)

If you want to create a startup, and you've never done that before, you should consult the resources that are relevant to your situation.

[FR] Si vous comprenez le français, je vous invite à regarder la vidéo de mon pote Shubham qui résume assez bien le plus gros des conseils de cette page, en 8 minutes: Vous avez une idée de startup ?.

[FR] ...et si vous voulez comprendre tout ce contenu de manière plus efficace et ludique, inscrivez-vous sur mon MOOC "Startup Tour: créez votre startup en 3h" (gratuit).


@drkarl
drkarl / gist:739a864b3275e901d317
Last active October 17, 2023 10:43
Ask HN: Best Linux server backup system?

Linux Backup Solutions

I've been looking for the best Linux backup system, and also reading lots of HN comments.

Instead of putting pros and cons of every backup system I'll just list some deal-breakers which would disqualify them.

Also I would like that you, the HN community, would add more deal breakers for these or other backup systems if you know some more and at the same time, if you have data to disprove some of the deal-breakers listed here (benchmarks, info about something being true for older releases but is fixed on newer releases), please share it so that I can edit this list accordingly.

  • It has a lot of management overhead and that's a problem if you don't have time for a full time backup administrator.
@anton-rudeshko
anton-rudeshko / convert.sh
Last active October 17, 2020 01:01
Convert GoPro photos to timelapse video using ffmpeg CLI.
#!/usr/bin/env bash
# -r 60: 60 FPS
# -y: rewrite output file
# -start_number 11555: first frame number
# -i 'G%07d.JPG': file format
# -vf "crop=h=2250": video filter to crop input frame height from 3000 to 2250 (which will be eventually downscaled to 720)
# -c:v libx264: video codec x264
# -crf 20: x264 encoding quality (less = better)
# -s 1280x720: output size
@hendrikb
hendrikb / .Xmodmap
Created November 18, 2014 08:53
Xmodmap mapping: Make Macintosh Apple US Keyboards behave like a PC keyboard on Ubuntu
! Xmodmap mapping for Macintosh Apple US Keyboards
! Very useful if You want to use an Apple keyboard on your Ubuntu PC.
! It turns (Mac's) CMD to (PC's) ALT and (Mac's) ALT to (PC's/Ubuntu's) SUPER key
! -- so it kind of behaves like a regular PC keyboard --
! and enable German Umlauts when pressing right CMD + u/a/o/s
! Put these lines into your ~/.Xmodmap and call xmodmap ~/.Xmodmap to change your keyboard layout
! clean most of the modifiers
@Ashton-W
Ashton-W / UIStoryboardSegue+Assignable.m
Created November 13, 2014 06:08
I'm happy with this method of moving models around in segues. For every model that might move around, a protocol is created for assignment, and a segue category method is added to assign it to destination view controllers if they conform to it. `prepareForSegue:` sends a messages for all its models to any segue.
/***
*
* Usage:
* ```
* - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
* {
* [segue prepareWithExampleModel:self.model];
* }
* ```
*/
@brianv0
brianv0 / message_backup.py
Last active December 17, 2021 17:01
iOS messages html and json dump with file copying
#!/usr/bin/python
import json
import sys
import os
import datetime
import codecs
import sqlite3
import re
import struct