Skip to content

Instantly share code, notes, and snippets.

xgdgsc / gist:c97e96046ff77c49017e81919aba507b
Created Feb 19, 2021
linux 搜狗输入法 隐藏状态栏
View gist:c97e96046ff77c49017e81919aba507b
vim $HOME/.config/sogoupinyin/conf/env.ini
找到StatusAppearance 设置为
xgdgsc / clash filter auto switch.yml
Last active Jan 13, 2021
clash filter auto switch load-balance example
View clash filter auto switch.yml
code: |
module.exports.parse = (raw,{ yaml }) => {
const rawObj = yaml.parse(raw)
var proxy_groups = rawObj["proxy-groups"]
var valid_arr = []
var select_i = 0
for(var i = 0; i < proxy_groups.length; i++) {
var obj = proxy_groups[i];
if(obj["name"].localeCompare("♻️ 自动选择")==0){
for(var j=0;j<obj["proxies"].length;j++){
View gist:1667c7bbe5b260feda9be5e84e418201
IntelliSense Engine = Default.
Autocomplete is enabled.
Enhanced Colorization is enabled.
Error squiggles are enabled if all header dependencies are resolved.
File exclude: **/.git
File exclude: **/.svn
File exclude: **/.hg
File exclude: **/CVS
xgdgsc / confirm.go
Created May 26, 2018 — forked from r0l1/confirm.go
Go (golang): How to ask for user confirmation via command line
View confirm.go
/* MIT License
* Copyright (c) 2017 Roland Singer []
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
xgdgsc /
Created Oct 26, 2017 — forked from drmalex07/
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward


Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

Description=Setup a secure tunnel to %I
View compressed_csv_reader.h
#pragma once
#include <iostream>
#include <sstream>
#include <vector>
#include <boost/algorithm/string.hpp>
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filter/bzip2.hpp>
#include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/filtering_stream.hpp>
xgdgsc /
Created Sep 18, 2017
pomotodo task switch reminder
import requests
import json
from datetime import datetime, timedelta
import os
if == 'nt':
from win10toast import ToastNotifier
toaster = ToastNotifier()
//from config import *
tail -n0 -F "$1" | while read LINE; do
(echo "$LINE" | grep -e "$3") && curl -X POST --silent --data-urlencode \
"payload={\"text\": \"$(echo $LINE | sed "s/\"/'/g")\"}" "$2";
xgdgsc / .bashrc
Created Jun 6, 2017 — forked from copperlight/.bashrc
Window Subsystem for Linux ssh-agent Configuraton
View .bashrc
# ... more above ...
# wsfl bash is not a login shell
if [ -d "$HOME/bin" ] ; then
# ssh-agent configuration
if [ -z "$(pgrep ssh-agent)" ]; then
rm -rf /tmp/ssh-*
xgdgsc / date_conversion.cpp
Created Mar 20, 2017 — forked from st-j/date_conversion.cpp
Convert between boost dates and Unix timestamps (time_t)
View date_conversion.cpp
#include <ctime>
#include <iostream>
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
//! Convert date part of Unix timestamp (time_t) to boost date