Skip to content

Instantly share code, notes, and snippets.

View m2kar's full-sized avatar

M2kar m2kar

View GitHub Profile
@m2kar
m2kar / github-issue-editor-full-screen.js
Last active May 26, 2023 10:45
GitHub Issues Editor Full Screen
// ==UserScript==
// @name GitHub Issues Editor Full Screen
// @namespace https://greasyfork.org/en/scripts/467156-github-issues-editor-full-screen/code
// @version 0.1
// @description Add a full screen button in the right-top of the github issue editor.
// @match https://github.com/*/issues/*
// @grant none
// @author m2kar (m2kar.cn#gmail.com)
// @origin-url https://gist.github.com/m2kar/a9beddbd946dada991e87ed366b9b24e
// @license MIT
@m2kar
m2kar / WindowsTerminalContextMenu.reg
Last active June 5, 2020 02:55
Windows Terminal Configure
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell]
@="Git Ba&sh Here"
"Icon"="D:\\Git\\git-bash.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell\command]
@="\"C:\\Users\\iMakar\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe\" -p GitBash -d \"%V\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\Debian]
@m2kar
m2kar / gitlab_python.py
Created April 1, 2020 13:25
gitlab python
import gitlab
gl=gitlab.Gitlab(gitlab_url,gitlab_token)
project=gl.projects.get(149)
issue=project.issues.get(1)
note=issue.notes.create(data={"body":"text"})
@m2kar
m2kar / logging.py
Created March 5, 2020 05:46
log配置
import logging
import const
#DEBUG级别的错误,输出到 const.LOGFILE
logging.basicConfig(level=logging.DEBUG,
                    format='%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s', # 输出格式
                    datefmt='%a, %d %b %Y %H:%M:%S',
                    filename=const.LOGFILE,
                    filemode='a')
@m2kar
m2kar / tmux-cheatsheet.markdown
Created December 23, 2019 01:13 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@m2kar
m2kar / profiles.json
Last active December 20, 2019 16:46
Windows Terminal: Add Git Bash
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"profiles": [
{
// Make changes here to the powershell.exe profile
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
@m2kar
m2kar / docker-compose.yml
Last active November 29, 2019 11:39
SSR docker 配置脚本
version: "3.6"
services:
ssr:
image: winterssy/shadowsocksr:latest
container_name: ssr
# ports:
# - 8989:8989
# - 8686:8686
network_mode: "host"
@m2kar
m2kar / Background Jobs.ipynb
Created November 27, 2019 00:07
使用jupyter(ipython)运行后台任务
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@m2kar
m2kar / Introduction to Redis with Python.ipynb
Last active November 26, 2019 15:30
Introduction to Redis with Python (python redis使用介绍示例) 转载自 https://github.com/jadianes/redis-integration-patterns-python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@m2kar
m2kar / zgxw.json
Last active November 25, 2019 05:57
发送一条增广贤文到139邮箱,进而发送到手机
[
"昔时贤文,诲汝谆谆,集韵增文,多见多闻。",
"观今宜鉴古,无古不成今。",
"知己知彼,将心比心。",
"酒逢知己饮,诗向会人吟。",
"相识满天下,知心能几人。",
"相逢好似初相识,到老终无怨恨心。",
"近水知鱼性,近山识鸟音。",
"易涨易退山溪水,易反易覆小人心。",
"运去金成铁,时来铁似金,读书须用意,一字值千金。",