Skip to content

Instantly share code, notes, and snippets.

View telamonian's full-sized avatar

Max Klein telamonian

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@borekb
borekb / README.md
Last active May 21, 2024 21:41
How to link to headings in GitHub issues and pull requests

How to link to headings in GitHub issues and pull requests

If you have an issue comment / PR description on GitHub, it doesn't automatically get anchors / IDs that you could link to:

Screenshot 2019-07-11 at 13

What I like to do is to add a visible # character like this:

Screenshot 2019-07-11 at 13 42 21

wget -O /tmp/YaHei.Consolas.1.12.zip https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/uigroupcode/YaHei.Consolas.1.12.zip
unzip /tmp/YaHei.Consolas.1.12.zip
sudo mkdir -p /usr/share/fonts/consolas
sudo mv YaHei.Consolas.1.12.ttf /usr/share/fonts/consolas/
sudo chmod 644 /usr/share/fonts/consolas/YaHei.Consolas.1.12.ttf
cd /usr/share/fonts/consolas
sudo mkfontscale && sudo mkfontdir && sudo fc-cache -fv
@tap52384
tap52384 / readme.md
Last active January 10, 2023 23:38
Bootcamp via Virtualbox 5.2 on macOS Mojave
@thvitt
thvitt / register-jupyter-env
Last active March 31, 2023 16:26
Register a jupyter kernel for the current pyenv.
#!/bin/sh
if [ "$PYENV_VERSION" -ne "" ]
then
name=`pyenv version-name`
python=`pyenv which python`
else
name=`basename "$VIRTUAL_ENV"`
python="$VIRTUALENV/bin/python"
fi
@alfredkrohmer
alfredkrohmer / xbox-one-wireless-protocol.md
Created November 23, 2016 21:52
XBox One Wireless Controller Protocol

Physical layer

The dongle itself is sending out data using 802.11a (5 GHz WiFi) with OFDM and 6 Mbit/s data rate:

Radiotap Header v0, Length 38
    Header revision: 0
    Header pad: 0
    Header length: 38
    Present flags
@Borod4r
Borod4r / UnityShaders.xml
Last active October 25, 2021 13:26
Basic syntax highlight for Unity ShaderLab code in Project Rider
<!--
Basic syntax highlight for Unity ShaderLab code in Project Rider.
v1.0
Download this file and put it into your "filetypes" folder.
Windows Vista, 7, 8, 10:
<SYSTEM DRIVE>\Users\<USER ACCOUNT NAME>\.Rider10\config\filetypes
Mac OS X:
@IceCreamYou
IceCreamYou / force-scrollbars-visible.css
Last active March 6, 2024 01:00
Mac OS X hides scrollbars by default. This is annoying for UI design because it means users might not realize that certain areas are scrollable. This public domain Gist forces the scrollbar to always be visible with native behavior in Webkit-based browsers (Chrome and Opera) on Macs.
.force-show-scrollbars ::-webkit-scrollbar-track:vertical {
border-left: 1px solid #E7E7E7;
box-shadow: 1px 0 1px 0 #F6F6F6 inset, -1px 0 1px 0 #F6F6F6 inset;
}
.force-show-scrollbars ::-webkit-scrollbar-track:horizontal {
border-top: 1px solid #E7E7E7;
box-shadow: 0 1px 1px 0 #F6F6F6 inset, 0 -1px 1px 0 #F6F6F6 inset;
}
@mislav
mislav / spotify-remote-patch.sh
Last active May 4, 2023 11:09
Patch installer for OS X `rcd` daemon to make headset remote buttons start/stop Spotify instead of iTunes. The pause/resume functionality still doesn't work unless iTunes is running in the background, for some inexplicable reason.
#!/bin/bash
# Run once to patch `rcd` daemon after creating a backup.
# Run again to restore the backup and revert back to original functionality.
set -eu
if [ "$USER" != "root" ]; then
exec sudo "$0" "$@"
fi
rcd="/System/Library/CoreServices/rcd.app/Contents/MacOS/rcd"
@arulrajnet
arulrajnet / ChromeAppDownloader.py
Last active February 15, 2024 01:06
Python Script to download the Chrome Extensions (CRX) file directly from the google chrome web store.
# -*- coding: utf-8 -*-
"""
Python Script to download the Chrome Extensions (CRX) file directly from the google chrome web store.
Referred from http://chrome-extension-downloader.com/how-does-it-work.php
"""
from __future__ import division
import argparse
import requests