Skip to content

Instantly share code, notes, and snippets.

View lifesign's full-sized avatar
🎯
Focusing

Feng lifesign

🎯
Focusing
View GitHub Profile
@lifesign
lifesign / smart-caps-lock.md
Created December 18, 2020 11:24 — forked from tanyuan/smart-caps-lock.md
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.
@lifesign
lifesign / osx-for-hackers.sh
Created February 26, 2020 05:49 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@lifesign
lifesign / instructions.rst
Created February 7, 2020 15:43 — forked from Nachtalb/telegram-desktop-multiple-accounts.rst
Add multiple accounts in Telegram Desktop [Linux | MacOSX | Windows]

How to add multiple accounts to Telegram Desktop

Table of Contents

Introduction

ATM of writing this, there is no way inside the Telegram Client to switch accounts (event though this feature exists in the offical mobile clients and there is a long running issue here: telegramdesktop/tdesktop#4261).

@lifesign
lifesign / install.php
Last active August 18, 2019 08:30
for package build.
<?php
namespace
{
use Herrera\Version\Comparator;
use Herrera\Version\Dumper;
use Herrera\Version\Parser;
$n = PHP_EOL;
{
"schema_version": 1,
"name": "优惠信息",
"description": "No description provided",
"source_url": false,
"guid": "863b90779850e0325ff6e55a6019d9d5",
"tag_fg_color": "#ffffff",
"tag_bg_color": "#5bc0de",
"icon": "gear",
"exported_at": "2018-09-07T04:06:31Z",
@lifesign
lifesign / brew list.txt
Created August 22, 2017 16:01
packages I use from homebrew
ack
adns
ant
antibody
aria2
asciinema
aspcud
autoconf
autojump
automake
@lifesign
lifesign / enable-HiDPI.sh
Created August 19, 2017 12:36
enable-HiDPI
#!/bin/sh
# enable-HiDPI.sh
#
#
# Created by syscl/lighting/Yating Zhou on 16/3/2.
#
#================================= GLOBAL VARS ==================================

WindVane Bridge API (v1.2.2)

提供与客户端通讯的机制。支持WindVane SDK v2.2 以上版本。

WindVane 独有UA

windvane 在客户端中,会将原始UA后面跟上 WindVane/WindVaneSDK的版本号,你可以通过判断UA的方式来检查环境 其中,淘宝主客户端1212版本(IOS 3.4.5 ANDROID 3.9.5)后格式为

@lifesign
lifesign / develop
Created November 24, 2016 06:06 — forked from fideloper/develop
Helper for Laravel + Docker dev workflow
#!/usr/bin/env bash
# Set environment variables for dev
export APP_ENV=local
export APP_PORT=80
export DB_PORT=3306
export DB_ROOT_PASS=secret
export DB_NAME=homestead
export DB_USER=homestead
export DB_PASS=secret
<?php
/*
//Normal query
User::all();
//Cached query (default 60min)
User::cached()->all();
//Cached query (5min)