Skip to content

Instantly share code, notes, and snippets.

View winddweb's full-sized avatar

Yifeng Huang winddweb

View GitHub Profile
@winddweb
winddweb / VIA Porting Info.md
Created March 22, 2021 06:47 — forked from nooges/VIA Porting Info.md
Info on adding VIA Configurator support to a board using QMK

Making a board compatible with VIA Configurator

💥NOTE💥: Don't do this yet, all of this stuff is still 🚑💣BLEEDING EDGE💣🚑, and you will 🔪cut yourself🔪 badly if you choose to do it. Please wait for 🗿Wilba's QMK code to be refactored prior to pushing anything to QMK, as we don't want to end up with a bunch of different forks of the code.

So you've seen VIA Configurator in action, and you want to get this magic supported for your board?

There's two main steps:

  1. Add dynamic keymap support to keyboard in QMK
  2. Add layout to VIA
@winddweb
winddweb / md-toc.rb
Created March 12, 2017 03:11 — forked from JenniferMack/md-toc.rb
Create a table of contents for Ulysses markdown
#!/usr/bin/env ruby
toc = "# Table of Contents\n"
newmd = ""
ARGF.each_line do |line|
newmd << line
next if !line.start_with?("#")
heading = line.gsub("#", "").strip
@winddweb
winddweb / README-Template.md
Created February 28, 2017 20:29 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@winddweb
winddweb / README.md
Created February 28, 2017 20:28 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@winddweb
winddweb / itunesicon.rb
Created February 9, 2017 07:07 — forked from ttscoff/itunesicon.rb
Retrieve a 512 x 512px icon for an iOS app
#!/usr/bin/ruby
# encoding: utf-8
#
# Grab iTunes Icon - Brett Terpstra 2014 <http://brettterpstra.com>
#
# Retrieve an iOS app icon at the highest available resolution
# All arguments are combined to create an iTunes search
# The icon for the first result, if found, is written to a filename based on search terms
#
# example:
@winddweb
winddweb / Example_output_link
Last active October 11, 2016 02:51
PlantUML diagram about something you won't understand
@winddweb
winddweb / imas-cg.net.user.js
Created September 23, 2016 01:23
Reverse the comment block and start from 1 for the forum site imas-cg.net iDolm@ster Cinderella girls
// ==UserScript==
// @name imas-cg.net reverse-comment
// @namespace http://imas-cg.net/
// @version 0.9
// @description Reverse the comment block and start from 1 for the forum site imas-cg.net iDolm@ster Cinderella girls
// @author Winddweb
// @match http://imas-cg.net/*
// @include http://imas-cg.net/*
// @grant none
// ==/UserScript==
body{
font-family: -apple-system, BlinkMacSystemFont, 'Microsoft YaHei', sans-serif;
}
.tagline{
font-family: 'PingFang SC', 'Myriad Pro', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}
import Cocoa
// for-in
func checkForIn(array: [Int], dict: [Int: String]) {
for num in array where dict[num] != nil {
num
}
}
checkForIn([1,2,3,4], dict: [1:"one", 2:"two"])
/**
Description area, **with markdown support**
*Values*
`NegativeCount` The count is less than 0.
`EmptyString1` The first string argument is empty.
# Document title