Skip to content

Instantly share code, notes, and snippets.

View loyalpartner's full-sized avatar
💭
I may be slow to respond.

lee loyalpartner

💭
I may be slow to respond.
  • 13:31 (UTC -12:00)
View GitHub Profile
@loyalpartner
loyalpartner / setup.md
Created April 23, 2022 13:16 — forked from lazypower/setup.md
Run Minikube in LXD

Running Minikube via LXD

I make some assumptions, and make no claims in how well supported this is or ever will be. I wanted to avoid using VMs because i've been working in containers for the last half decade. It made sense to just skip the middle man and use a machine type container system to run my minikube workloads.

Why not juju?

Simply put, Juju does a fantastic job; but to stay objective I wanted to achieve minikube in LXD as a functional alternative to juju deploy kubernetes-core, or using KVM/VirtualBox in this solution.

{
"client_status": {
"hierarchy_conflict_detected": false,
"is_sync_feature_enabled": true
},
"commit": {
"cache_guid": "WA4JCjn+SkfrM3rSFvhnmg==",
"config_params": {
"cookie_jar_mismatch": false,
"enabled_type_ids": [ "32904", "37702", "45873", "63951", "31729", "306270", "330441", "774329", "41210", "40781", "48119", "88610", "50119", "48364", "103656", "96159", "150251", "170540", "154522", "16
@loyalpartner
loyalpartner / rrys.py
Last active July 7, 2020 17:23
python-tools
#!/usr/bin/env python3
# 一键复制人人影视下载链接
from urllib.parse import urlparse,parse_qs,urlsplit
import requests
import argparse
import json
import pyperclip
import webbrowser
; KeypressOSD.ahk
;--------------------------------------------------------------------------------------------------------------------------
; ChangeLog : v2.22 (2017-02-25) - Now pressing same combination keys continuously more than 2 times,
; for example press Ctrl+V 3 times, will displayed as "Ctrl + v (3)"
; v2.21 (2017-02-24) - Fixed LWin/RWin not poping up start menu
; v2.20 (2017-02-24) - Added displaying continuous-pressed combination keys.
; e.g.: With CTRL key held down, pressing K and U continuously will shown as "Ctrl + k, u"
; v2.10 (2017-01-22) - Added ShowStickyModKeyCount option
; v2.09 (2017-01-22) - Added ShowModifierKeyCount option
; v2.08 (2017-01-19) - Fixed a bug
@loyalpartner
loyalpartner / .skhdrc
Created May 29, 2019 07:36
chunkwm.skhdrc
# add an on_enter command to the default mode
:: default : chunkc border::color 0x00000000
:: prefix : chunkc border::color 0xff24ccaa
:: desktop : chunkc border::color 0xffd75f5f
:: monitor : chunkc border::color 0xffd75f5f
#
# from 'default' mode, activate mode 'test'
@loyalpartner
loyalpartner / myspacevim.vim
Created May 10, 2019 02:12
space vim config
let s:file = expand('<sfile>:~')
function! myspacevim#before() abort
" let g:_spacevim_mappings_space.k = { 'name': '+GitHub' }
" let g:_spacevim_mappings_space.h.g = { 'name': '+GitHub' }
call SpaceVim#custom#SPC('nore', ['f', 'v', 'c'], 'e ' . s:file, 'open custom config', 1)
@loyalpartner
loyalpartner / Main.hs
Last active October 11, 2019 01:58
hello
-- file: ch05/Main.hs
import SimpleJSON
main = print (JObject [("name", JString "李凯"), ("age", JNumber 11)])
ok
hello

输入账号密码 类似腾讯QQ的的登陆框,账号和密码输入框都是有单独句柄的,同时他们的位置也是固定的

  var __x,__y
  windowgetpos(hwnd,__x,__y)      // 先获得登陆界面左上角的坐标
  var uhwnd = dmsoft.GetPointWindow(__x+143,__y+134)   // 账号框相对于左上角的偏移,这个偏移要自己算
  var phwnd = dmsoft.GetPointWindow(__x+125,__y+172)
  
  windowsetfocus(uhwnd)   // 让输入框获得焦点
 windowsendstring(uhwnd,"username") // 如果windowsendstring失效,可用driversendstring替代
vim 打开windows文件乱码
:e ++enc=cp936
@loyalpartner
loyalpartner / gist:e4446d4789324a3469fe
Created September 22, 2015 15:19
Windows 下 qwerty 转 dvorak 方案, 需要配合 autohotkey 使用
#SingleInstance force
#MaxHotkeysPerInterval 100
#UseHook
Process, Priority,, Realtime
SetKeyDelay -1
Menu, Tray, NoStandard
Menu, Tray, Tip, 键盘布局 - Dvorak
Menu, Tray, Add, 切换 (&Q), MenuSuspend
Menu, Tray, Add, 切换 (&Q), MenuSuspend