Skip to content

Instantly share code, notes, and snippets.

View saveman71's full-sized avatar

Antoine Bolvy saveman71

View GitHub Profile
@alepee
alepee / sublimetext-keyboard-shortcuts.sublime-keymap
Last active November 9, 2022 22:17
SublimeText shortcuts for Mac French keyboard (azerty)
[
// Square brackets aren't that usable in azerty.
// Replaces [ with ù and ] with $, closest usable combination to the American qwerty
{ "keys": ["super+shift+ù"], "command": "prev_view" },
{ "keys": ["super+shift+$"], "command": "next_view" },
{ "keys": ["super+ù"], "command": "unindent" },
{ "keys": ["super+$"], "command": "indent" },
{ "keys": ["super+alt+ù"], "command": "fold" },
@tadly
tadly / pacaur_install.sh
Last active August 30, 2023 13:15
A simple shell script to quickly / easily install "pacaur" on archlinux
#!/bin/sh
#
# !!! IMPORTANT !!!
# As of 2017-12-14, pacaur is unmaintained (https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144)
# For alternatives see the arch wiki: https://wiki.archlinux.org/index.php/AUR_helpers#Active
# pacaur seems to get occasional updates to fix breaking changes due to pacman updates though.
#
# If you are new to arch, I encourage you to at least read and understand what
# this script does befor blindley running it.
# That's why I didn't make a one-liner out of it so you have an easier time
@phiresky
phiresky / motioninterpolation.vpy
Last active June 4, 2024 05:19
Realtime motion interpolating 60fps playback in mpv
# vim: set ft=python:
# see the README at https://gist.github.com/phiresky/4bfcfbbd05b3c2ed8645
# source: https://github.com/mpv-player/mpv/issues/2149
# source: https://github.com/mpv-player/mpv/issues/566
# source: https://github.com/haasn/gentoo-conf/blob/nanodesu/home/nand/.mpv/filters/mvtools.vpy
import vapoursynth
core = vapoursynth.get_core()
@ctolsen
ctolsen / curl_to_ab.py
Last active June 3, 2024 11:59
"Copy to cURL" in Chrome to Apache Bench command
#!/usr/bin/env python3
import sys
import os
def curl_to_ab(curl_cmd: list, num: int=200, cur: int=4) -> str:
"""
Translate a cURL command created by Chrome's developer tools into a
command for ``ab``, the ApacheBench HTTP benchmarking tool.
@CodeMyUI
CodeMyUI / index.html
Created October 23, 2016 12:27
Star rating for email
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
/* Star hover using lang hack in its own style wrapper, otherwise Gmail will strip it out */
* [lang~="x-star-wrapper"]:hover *[lang~="x-star-number"]{
color: #119da2 !important;
border-color: #119da2 !important;
}
This work, excluding the Arch Linux logo, is made available under CC0: https://creativecommons.org/publicdomain/zero/1.0/
@angelikatyborska
angelikatyborska / gettext.ex
Last active March 11, 2024 13:50
A custom `gettext_with_link` macro for easily putting inline links into gettext strings
# Has one external dependency except for Gettext: https://github.com/rrrene/html_sanitize_ex
defmodule MyApp.Gettext do
@doc """
A helper for translations with links.
Pass in the translation string which must include
`%{link_start}`/`%{link_end}`. For multiple URLs, use
`%{link_start_<0,1,2...>}`.