Skip to content

Instantly share code, notes, and snippets.

View manuhabitela's full-sized avatar
🦆

Emmanuel Pelletier manuhabitela

🦆
View GitHub Profile

KC60 Keyboard end-user tips, tricks, programming notes, etc.

Leimi's note: removed lots of stuff from the original gist of scottjl, (thanks to him by the way!), as in the end some wasn't useful for me. If you are intestered, go check the gist revisions.

The KC60 is kinda like a premade GH60 that was first sold on Massdrop during summer 2015.
It runs on TMK firmware, or something based on it at least (not sure this is the real source for the keyboard but it seems it is), which means it's heavily programmable.
There is a GUI tool (the source of this tool seems to be here) and a command-line tool to ease up the process of programming the board.
**Go check this great article on Key

@manuhabitela
manuhabitela / README.md
Last active September 2, 2022 16:48
Setting up atomizer in a vite project

This is just a copy of a work I won't use right now I guess. Wanted to use atomizer (acss.io) in a vite project and the official plugin didn't work in dev mode. So I tried a few things.

@manuhabitela
manuhabitela / monitor.sh
Last active July 26, 2021 05:15
Easy monitor switch
#!/bin/bash
# see help section below for script description
# change the four "constants" below to match your config
# this is the xrandr monitor name for the "temporary" monitors you connect often on your laptop,
# via the HDMI or VGA cable directly, for projecting on TV or whatever
DEFAULT_OTHER_MONITOR="VGA-1"
# this is the xrandr monitor name of your usual external monitor you use 99% of the time
DEFAULT_WORK_MONITOR="DP-2"
#!/usr/bin/env python
#-------------------------------------------------
# file: twitcher.py
# author: Florian Ehmke
# description: dmenu for twitch streams
#-------------------------------------------------
import argparse
import requests
from subprocess import Popen, PIPE, STDOUT
@manuhabitela
manuhabitela / _grid.scss
Last active January 11, 2021 14:15
Making the Bootstrap grid with Susy and sass-mq
// this is (a start of) an example of a Susy+mq() setup that mimics bootstrap grid.
// I work on multiple bootstrap-based projects.
// I want to stop using grid classes in the markup, and start using mixins with susy and sass-mq.
// Since the project is heavily tied to the bootstrap grid, I want to have the exact same behavior
// between bootstrap classes (old code) and susy mixins (new code).
// all the grid classes generated below are here to ease up testing.
// required: susy + sass-mq
@manuhabitela
manuhabitela / create-drawing.php
Last active November 26, 2020 11:08
DrawingBoard: let people draw and save their images server-side https://github.com/Leimi/drawingboard.js
<?php
//server-side code where we save the given drawing in a PNG file
$img = filter_input(INPUT_POST, 'image', FILTER_SANITIZE_URL);
$name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);
//see http://j-query.blogspot.fr/2011/02/save-base64-encoded-canvas-image-to-png.html
$img = str_replace(' ', '+', str_replace('data:image/png;base64,', '', $img));
$data = base64_decode($img);
@manuhabitela
manuhabitela / keymap_leimi.c
Last active September 16, 2020 23:44
Layout GH60 RevCHN - spaceFN, ctrl on capslock, ISO missing key on fn layer
#include "keymap_common.h"
/* following https://gist.github.com/Leimi/bca49d02e48c018ce4c8 to flash firmware on GH60 RevCHN */
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* layer0: 60% qwerty with custom modifiers
* ESC instead of GRV, FN1 instead of LGUI, LGUI instead of LCTL, LCTL instead of CAPS, SPACEFN instead of SPACE */
KEYMAP_ANSI(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
@manuhabitela
manuhabitela / compile.js
Last active September 4, 2019 08:51
Checking environment in (node) Sass
#!/usr/bin/env node
var fs = require('fs');
var path = require('path');
var sass = require('node-sass');
var ENV = process.env.SASS_ENV || 'development';
var file = 'variables.scss';
//if in dev, directly pass file to sass
if (ENV === "development") {

This is a quick guide to changing the keymap on the GH60 "Satan" or RevCHN. Note that the Satan is NOT a true GH60, and using the GH60 with the normal TMK would not work.

Note that installing dependencies or compiling TMK is not a part of the scope of this document. If you have problems with this part, seek help elsewhere. Not also that these instructions are written for Linux and Mac. If you're using windows, just use the Command Prompt for the git commands, and Windows Explorer to move and delete files.

  1. Dependencies.
  2. Download and install GIT: https://git-scm.com/downloads
  3. Download and install the dependencies for compiling TMK: https://github.com/tmk/tmk_keyboard/blob/master/doc/build.md (Point 1 only)
  4. Using git, download the TKG toolkit. https://github.com/kairyu/tkg-toolkit git clone git@github.com:kairyu/tkg-toolkit.git tkg
  5. Still using git, download Kairyu's fork of TMK. https://github.com/kairyu/tmk_keyboard_custom git@github.com:kairyu/tmk_keyboard_custom.git tmk
@manuhabitela
manuhabitela / index.js
Last active September 23, 2018 17:33
Liens youtube du topic musique electroniques jeuxonline.info
const process = require('process');
const cheerio = require('cheerio');
const request = require('request');
const queryString = require('query-string');
const getPage = (url) =>
new Promise((resolve, reject) => {
request(url, (error, response, body) => {