Skip to content

Instantly share code, notes, and snippets.

View lostsnow's full-sized avatar
👻
nil

lostsnow lostsnow

👻
nil
  • Litsea
  • Phobos, Mars
View GitHub Profile
override_git_prompt_colors() {
# This is the custom theme template for gitprompt.sh
GIT_PROMPT_THEME_NAME="Custom"
GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${ResetColor}[${Cyan}${USER}${ResetColor}@${Green}${HOSTNAME%%.*}:${Yellow}${PathShort}${ResetColor}]"
GIT_PROMPT_START_ROOT="_LAST_COMMAND_INDICATOR_ ${ResetColor}[${BoldRed}${USER}${ResetColor}@${Green}${HOSTNAME%%.*}:${Yellow}${PathShort}${ResetColor}]"
GIT_PROMPT_END_ROOT="${BoldRed}\n\A #${ResetColor} "
GIT_PROMPT_END_USER="${ResetColor}\n\A $ "
@lostsnow
lostsnow / frpc.service
Last active December 2, 2019 07:44
frp systemd
[Unit]
Description=FRP Client Daemon
After=network.target
Wants=network.target
[Service]
Type=simple
ExecStart=/usr/bin/frpc -c /etc/frpc.ini
Restart=always
RestartSec=20s
(function($)
{
$.Redactor.prototype.readonly = function()
{
return {
init: function()
{
if (!this.opts.readonly) return;
this.opts.toolbar = false;
@lostsnow
lostsnow / axurepr 序列号
Created August 16, 2018 02:50
一些能用的团队版序列号
**Axure 8.0及以前**
Licensee:IloveyouAxure
Key:UChpuxwbDW6eAIaAf9UujEFSBwN3vpEz9snHvlCQVJGQy4p7WrCyKLLvV5QLvqva
Licensee:Axure
Key:8t+3Yk/zu4cX601/seX6wBZgYRVj/lkC2PICCdO4+sFKCCLx8mcCnccoylVb40lP
Licensee:axureuser
Key:8wFfIX7a8hHq6yAy6T8zCz5R0NBKeVxo9IKu+kgKh79FL6IyPD6lK7G6+tqEV4LG
Licensee:米 业成 (STUDENT)
Key:nFmqBBvEqdvbiUjy8NZiyWiRSg3yO+PtZ8c9wdwxWse4WprphvSu9sohAdpNnJK5
**Axure 8.1.0.3366**
--style=1tbs
indent=spaces=4
indent-namespaces
indent-classes
indent-modifiers
indent-switches
indent-after-parens
indent-preproc-define
indent-col1-comments
const vscode = require('vscode'),
childProcess = require('child_process'),
fs = require('fs');
// Global vars
// Status bar
const statusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
// Show message in StatusBar
@lostsnow
lostsnow / user-settings.json
Last active February 28, 2020 02:58
VSCode user settings
{
"editor.renderWhitespace": "all",
"editor.dragAndDrop": false,
"editor.detectIndentation": false,
"editor.fontFamily": "'Noto Sans Mono', Consolas, 'Courier New', monospace",
"editor.rulers": [80, 120],
"files.eol": "\n",
"files.encoding": "utf8",
"files.exclude": {
@lostsnow
lostsnow / uprintf.cc
Last active July 20, 2018 06:50
fluffos sprintf for utf-8 (only support %s, %d, %f with efun)
/*
* This is an implementation of wcwidth() and wcswidth() (defined in
* IEEE Std 1002.1-2001) for Unicode.
*
* http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html
* http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html
*
* In fixed-width output devices, Latin characters all occupy a single
* "cell" position of equal width, whereas ideographic CJK characters
* occupy two such cells. Interoperability between terminal-line
@lostsnow
lostsnow / *grafana+prometheus.md
Last active July 12, 2018 01:48
Grafana & Prometheus

Grafana & Prometheus

Grafana

cat > /etc/yum.repos.d/prometheus.repo <<-GRAFANA
[grafana]
name=grafana
baseurl=https://packagecloud.io/grafana/stable/el/7/\$basearch
@lostsnow
lostsnow / Translate_GBK_TO_UTF8.xml
Last active July 2, 2018 06:36
Translate sent text GBK into UTF-8
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
name="Translate_GBK_TO_UTF8"
author="lostsnow"
id="b5d6c2e22177e7a13b081a29"
language="Lua"
purpose="Translate sent text GBK into UTF-8"