Skip to content

Instantly share code, notes, and snippets.

View kuanyui's full-sized avatar
❄️
なんでそんなに慣れてんだよ!

クエン酸 kuanyui

❄️
なんでそんなに慣れてんだよ!
View GitHub Profile
@FelixZhang
FelixZhang / osc-cheatsheet.md
Last active August 7, 2024 07:39
osc cheatsheet

osc cheatsheet

configuration

.oscrc

TBD

aliases

@only-cliches
only-cliches / pixibackground.js
Last active March 27, 2025 19:39
PixiJS Background Cover & Background Container
/*
* PixiJS Background Cover/Contain Script
* Returns object
* . {
* container: PixiJS Container
* . doResize: Resize callback
* }
* ARGS:
* bgSize: Object with x and y representing the width and height of background. Example: {x:1280,y:720}
* inputSprite: Pixi Sprite containing a loaded image or other asset. Make sure you preload assets into this sprite.
@bisubus
bisubus / ES5-ES6-ES2017-ES2019 omit & pick
Last active April 13, 2024 21:03
ES5/ES6/ES2017/ES2019 omit & pick
@karlhorky
karlhorky / pr.md
Last active January 9, 2025 09:01 — forked from piscisaureus/pr.md
Fetch all GitHub pull requests to local tracking branches

NOTE

You may not need local branches for all pull requests in a repo.

To fetch only the ref of a single pull request that you need, use this:

git fetch origin pull/7324/head:pr-7324
git checkout pr-7324
# ...
@uranusjr
uranusjr / rpi-qt5-cc.md
Last active May 7, 2019 14:35
在 Ubuntu 16.04 為 Raspbian Jessie 交叉編譯 Qt 5.6 桌面版

在 Ubuntu 16.04 為 Raspbian Jessie 交叉編譯 Qt 5.6 桌面版

筆記

Qt 在 Raspberry Pi 上可以跑兩種版本:

  • 桌面版。你平常在 Linux 發行版裡看到的會是這個,包含 Raspbian 在內。通常基於 X11,就是個普通的 GUI 框架。
  • 嵌入版。這個版本不需要鐘面系統,通常是直接走 framebuffer 直接把東西畫到螢幕上,適合一些嵌入式設備的應用。

這個教學會編譯桌面版,因為我對這個版本比較熟。我上次試的時候 OpenGL 在 embedded 版還有些問題,不過 Qt 在那之後有很多更新,狀況應該會好很多。Qt 官方 wiki 也有個相關的教學:

@nicr9
nicr9 / content_disposition.py
Last active December 24, 2023 07:32
Add `Content-Disposition` header to SimpleHttpServer
#!/usr/bin/env python
from SimpleHTTPServer import SimpleHTTPRequestHandler, test
class CustomRequestHandler(SimpleHTTPRequestHandler):
def end_headers(self):
self.add_content_disposition()
SimpleHTTPRequestHandler.end_headers(self)
def add_content_disposition(self):
self.send_header("Content-Disposition", 'filename="content_disposition.py"')
@coldnew
coldnew / main.cpp
Last active January 5, 2016 10:09
Qt example for tarentella
#include <QApplication>
#include <QStringList>
#include <QListWidget>
#include <QRadioButton>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QListWidget *listWidget = new QListWidget();
@gbaman
gbaman / HowToOTG.md
Last active March 26, 2025 10:11
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

此僅為備份,因為原文在Facebook中。 作者:顏華容 https://www.facebook.com/artemis.yen/posts/10207549044542275

一點關於練琴效率的小心得 如果大家有興趣的話,在連假的這幾天可以實驗

實驗材料:沒有彈過的曲子(有沒有聽過無妨,因為聽過你也不見得會彈,哈哈。)

觀察曲式:意思就是說,「它是什麼時代來的誰?」