Skip to content

Instantly share code, notes, and snippets.

View bonnebulle's full-sized avatar
🎯
Focusing

vincent_b bonnebulle

🎯
Focusing
View GitHub Profile
#Define the SDL mapping string
#use SDL2 Gamepad Tool https://generalarcade.com/gamepadtool/ to generate mapping
SDL_MAPPING="03000000632500002705000010010000,SHANWAN Game Controller for Android,platform:Linux,a:b0,b:b1,x:b3,y:b4,back:b10,start:b11,leftstick:b13,rightstick:b14,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4"
#Start the game by setting environment variable
env SDL_GAMECONTROLLERCONFIG="$SDL_MAPPING" wine your_game.exe
// ==UserScript==
// @name Bandcamp Collection Extras
// @description Adds extras to Bandcamp collection pages
// @grant unsafeWindow
// @match https://bandcamp.com/*
// @run-at document-idle
// @version 1.0.0
// ==/UserScript==
class BandCampCollection {
@mehmetsefabalik
mehmetsefabalik / nginx-https-local.md
Last active February 27, 2025 08:08
Enable https on your local environment with nginx

enable https on your local environment

install mkcert and create certificates

brew install mkcert
mkcert -install
@plembo
plembo / CalibreServerOnLinux.md
Last active February 15, 2025 19:15
Calibre Server on Linux

Calibre Server on Linux

Introduction

Calibre is a powerful cross-platform, open source, ebook manager and editing platform. Its calibre-server component can be used to publish an e-book library on a local network. While you can launch calibre-server as a desktop application, it can also be run as a daemon on a headless Linux server.

This tutorial on setting up calibre-server using Ubuntu 14.04 is very good, but dated.

@PaddiM8
PaddiM8 / kanboard-darktheme.min.css
Created April 28, 2018 13:14
Kanboard Dark Theme CSS
blockquote,body,h1,li,ol,p,table,td,th,tr,ul{margin:0;padding:0;font-size:100%}strong{color:#333;!important}h2{color:white;!important}input{background-color:#333333;!important}body{padding-bottom:10px;color:white;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;text-rendering:optimizeLegibility;background-color:#333333}small{font-size:0.8em}hr{border:0;height:0;border-top:1px solid rgba(0, 0, 0, 0.1);border-bottom:1px solid rgba(255, 255, 255, 0.3)}.page{margin-left:10px;margin-right:10px;background-color:#333333}.margin-top{margin-top:20px}.margin-bottom{margin-bottom:20px}.pull-right{text-align:right}ul.no-bullet li{list-style-type:none;margin-left:0}#app-loading-icon{position:fixed;right:3px;bottom:3px}.assign-me{vertical-align:bottom}a{color:#fff;border:none}a:focus{outline:0;color:#DF5353;text-decoration:none}a:hover{color:white;text-decoration:none}a .fa{padding-right:3px;text-decoration:none;color:333}h1,h2,h3{font-weight:normal;color:white}h1{font-size:1.5em}h2{font-size:1.4em;margin-bottom:
@xirixiz
xirixiz / Set up GitHub push with SSH keys.md
Last active February 26, 2025 04:41 — forked from developius/README.md
Set up GitHub push with SSH keys

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "[email protected]"
@pythoninthegrass
pythoninthegrass / uninstall_mso.sh
Last active April 20, 2021 00:02 — forked from pirafrank/uninstall_office_2016.sh
Uninstall Microsoft Office from macOS completely
#!/usr/bin/env bash
# SOURCES:
# https://gist.github.com/pirafrank/18d62c062e2806c1d183
# SEE THIS EXCELLENT SITE IF GIST FAILS:
# https://office-reset.com
# activate verbose standard output (stdout)
set -v
@ORESoftware
ORESoftware / resize-base64.js
Last active October 13, 2024 17:55
resizing an image on the front-end before sending to a server
// Using this code, we can retrieve an image from a user's filesystem, resize the image, and then upload the image
// to a server using AJAX. Because we use base64 encoding, we can just include the image data as just another string value
// in a JSON payload.
// So we can use AJAX to send the file to a server, which is convenient.
// We have one line of relevant html
// get file in the first place => <input type="file" custom-on-change="onAcqImageFileChange" class="form-control">
@attacus
attacus / riot-matrix-workshop.md
Last active March 13, 2024 00:16
Create your own encrypted chat server with Riot and Matrix

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?