Skip to content

Instantly share code, notes, and snippets.

View corentinbettiol's full-sized avatar

Corentin Bettiol corentinbettiol

View GitHub Profile
@kepano
kepano / obsidian-web-clipper.js
Last active May 2, 2024 13:07
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@shawwn
shawwn / since2010.md
Created May 11, 2021 09:46
"What happened after 2010?"

This was a response to a Hacker News comment asking me what I've been up to since 2010. I'm posting it here since HN rejects it with "that comment is too long." I suppose that's fair, since this ended up being something of an autobiography.

--

What happened after 2010?

@rebane2001
rebane2001 / README.md
Last active January 12, 2024 15:47 — forked from corentinbettiol/README.md
Tiny js code that will simulate a 3D view of your elements, like firefox used to do.

example gif

Explanations

This script will get the computed background color of your body, and then will create shadows darker than your background (if you have a light background), or lighter than your background (if you have a dark background). If the body does not have a background, the script will take 160 as the default value for red, green and blue.

It will then add a border, a box-shadow, a padding and a margin to each element of your page, and will use the cool rotate3d css function to tilt your website.

Install

@roycewilliams
roycewilliams / pwnedpasswords-v6-top20k.txt
Last active April 1, 2024 18:14
pwnedpasswords-v6-top20k.txt
This file has been truncated, but you can view the full file.
#------------------------------------------------------------------------------
# Top 20K hashes from the Troy Hunt / haveibeenpwned Pwned Passwords list v6 (2020-06-19)
# with frequency count and cracked plaintext passwords
#
# The latest version of this file can be found here:
# https://gist.github.com/roycewilliams/226886fd01572964e1431ac8afc999ce
# The equivalent of this file, but based on v2 of the Pwned Passwords, is here:
# https://gist.github.com/roycewilliams/281ce539915a947a23db17137d91aeb7
#------------------------------------------------------------------------------
# Notes and references:
@yakky
yakky / 0001_initial.py
Last active September 15, 2023 11:12
Migrate a plugin from one type to another
from django.db import migrations
def migrate_to_new_plugin(apps, schema_editor):
OldPluginModel = apps.get_model("myapp", "PluginModel")
NewPluginModel = apps.get_model("myapp", "PluginModel")
for obj in OldPluginModel.objects.all():
#
new_obj = NewPluginModel()
new_obj.id = obj.id
@corentinbettiol
corentinbettiol / README.md
Last active January 12, 2024 15:47
Tiny js code that will simulate a 3D view of your elements, like firefox used to do.
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active May 2, 2024 12:25
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@crittermike
crittermike / wget.sh
Last active March 26, 2024 22:49
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment