Skip to content

Instantly share code, notes, and snippets.

View littleq0903's full-sized avatar
🎱
Wanna see some magic?

CoColin littleq0903

🎱
Wanna see some magic?
View GitHub Profile
@SCG82
SCG82 / obs-time-frame-resolution-mfc.lua
Last active February 20, 2024 09:39
Lua script for OBS to display current time, frame counter, resolution, target fps, broadcast type in a text source
script_ver = 2.7
obs = obslua
source_name = ""
last_text = ""
current_frame = 0
frame_rate = 0
time_format_string = ""
output_format_string = ""
@zzz67240
zzz67240 / double_pinyin_flypy.custom.yaml
Last active January 5, 2024 10:41
Rime 小鶴雙拼 臺灣正體中文
# double_pinyin_flypy.custom.yaml
#
# 獲取更多輸入方案:rime-double-pinyin
# 將檔案放置於如 C:\Users\使用者名稱\AppData\Roaming\Rime
# 重新部署後生效
#
# Edited by: Xin Yang
#
patch:
@noelbundick
noelbundick / Dockerfile
Last active June 21, 2024 10:00
Consuming packages from a private Azure Pipelines Python artifact feed
# We set an environment variable in this phase so it gets picked up by pip, but we don't want to bake secrets into our container image
FROM python:3.6-alpine AS builder
ARG INDEX_URL
ENV PIP_EXTRA_INDEX_URL=$INDEX_URL
COPY requirements.txt .
RUN pip install -U pip \
&& pip install --user -r requirements.txt
@staticor
staticor / default.custom.yaml
Last active April 2, 2020 21:26
Rime input method configuration - default.custom.yaml
patch:
menu:
page_size: 7 # 设置候选字数量 个人喜好 7
schema_list:
- schema: wubi_pinyin # 五笔拼音混合輸入 偶尔生字需要拼音
- shcema: luna_pinyin_simp # luna 拼音 个人几乎不用
#下面定义“输入选单”的切换控制
switcher:
@dentechy
dentechy / WSL-ssh-server.md
Last active June 13, 2024 15:17
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
@jgsqware
jgsqware / kubeadm-install-offline.md
Last active June 3, 2024 07:38
Offline Kubeadm install

On master and nodes

Pull images form internet access laptop

docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-proxy-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.5.0
docker pull weaveworks/weave-npc:1.8.2
docker pull weaveworks/weave-kube:1.8.2
@darthwalsh
darthwalsh / MinimalCSharp.md
Last active August 25, 2022 21:55
Minimal C# .NET Framework project - CS CSPROJ SLN

Note, this is for .NET Framework! Nowadays you probably want to use dotnet new cli to make a dotnet core project.

If you've ever started a simple C# project in Visual Studio, it creates a lot of cruft in your project.

These are a minimal set of files that you can start writing a C# programs. I deleted most lines from a starter CSPROJ and SLN file to get this starter template.

These files open and build cleanly in:

  • msbuild
  • Visual Studio
  • Visual Studio Code
# Use a custom dictionary.
patch:
translator/dictionary: terra_pinyin.mine
@lucemia
lucemia / gist:7262390
Created November 1, 2013 08:24
html snippet
<iframe frameBorder="0" scrolling="no" width="300" height="250" marginwidth="0" marginheight="0" style="display: visible" src="http://ad.tagtoo.co/ad_g_300x250?pb=66&id=4#q=http%3A%2F%2Fwww.mayuki.com.tw%2F&p=%%SITE%%&cachebuster=%%CACHEBUSTER%%&click=%%CLICK_URL_ESC%%"></iframe>
@georgefs
georgefs / copy.vim
Created September 14, 2013 16:12
ubuntu vim copy
python import gtk
python import vim
vmap <silent> <C-C> y:let @0=substitute(@0,"\\","\\\\\\","gi")<CR>:let @0=substitute(@0,"\'","\\\\'","gi")<CR>:python gtk.clipboard_get().set_text('''<C-R>0''')<CR>:python gtk.clipboard_get().store()<CR>