Skip to content

Instantly share code, notes, and snippets.

View songouyang's full-sized avatar
🎯
Focusing

songouyang

🎯
Focusing
View GitHub Profile
@albert-yu
albert-yu / .vimrc
Last active June 3, 2023 07:48
Vim settings
:set background=dark
:set t_Co=256
" :set number
:set relativenumber
:set rnu
" default tab settings
:set expandtab
:set shiftwidth=4
:set tabstop=4
@maboloshi
maboloshi / README.md
Last active July 21, 2024 01:30
[Mac下配置Aria2] #macOS #aria2

Mac下配置Aria2

安装和设置 Aria2

# 使用 Homebrew 安装 aria2
brew install aria2

# 创建配置文件aria2.conf和空对话文件aria2.session
mkdir ~/.aria2 && cd ~/.aria2
touch aria2.conf
@lvxianchao
lvxianchao / npm.taobao.sh
Last active July 22, 2024 00:41
设置 npm 和 yarn 的镜像源为淘宝镜像源
# ==========================================================
# NPM
# ==========================================================
npm set registry https://registry.npmmirror.com # 注册模块镜像
npm set disturl https://npmmirror.com/mirrors/node # node-gyp 编译依赖的 node 源码镜像
## 以下选择添加
npm set sass_binary_site https://registry.npmmirror.com/mirrors/node-sass # node-sass 二进制包镜像
npm set electron_mirror https://registry.npmmirror.com/mirrors/electron/ # electron 二进制包镜像
@mbleigh
mbleigh / README.md
Last active September 25, 2020 04:26
Automate the deletion of old Firebase Hosting versions.

Firebase Hosting Version Cleanup

This is a simple utility script for cleaning up Firebase Hosting versions, leaving a specified number of versions remaining. This is primarily done to conserve storage usage, but may have other uses.

USE AT YOUR OWN RISK. NO WARRANTY IS PROVIDED. THIS SCRIPT DOES DELETE STUFF PERMANENTLY

Usage

node cleanupVersions.js [commit]

@ruanbekker
ruanbekker / docker-nfs-volumes.md
Created December 10, 2017 10:43
NFS Volumes with Docker Swarm

Create NFS Volumes:

Creating the NFS Volume:

$ docker volume create --driver local \
  --opt type=nfs \
  --opt o=addr=192.168.1.115,uid=1000,gid=1000,rw \
  --opt device=:/mnt/volumes/mysql-test \
  mysql-test-1
@rambabusaravanan
rambabusaravanan / README.md
Last active March 6, 2021 13:37
GitLab CI Configuration YAML

Firebase Deployment

Step 1: Get Token

Generate the firebase token from your terminal using the command $ firebase login:ci

Waiting for authentication...

✔ Success! Use this token to login on a CI server:

1/VXXXXXXX--YOUR-FIREBASE-CI-TOKEN--XXXXXh92o

#!/bin/bash
# save as /root/del_user.sh
USERNAME=$1
if [[ -z "$USERNAME" ]]; then
echo "Please give me a username"
exit 1
fi
echo "This script will"
@enpassant
enpassant / vimwiki2html.md
Last active May 14, 2024 20:56
Convert VimWiki to HTML (markdown, mediawiki)

With this wiki2html.sh bash script and pandoc program, you can convert markdown to html.

Usage: In the vim list section of the .vimrcfile, include options:

let g:vimwiki_list = [{'path': ‘your_wiki_place',
  \ 'path_html': ‘wiki_html_location’,
  \ 'syntax': 'markdown',
 \ 'ext': '.md',
@krtx
krtx / imgcat
Created November 27, 2016 02:48
fix imgcat to be able to display images on tmux https://gitlab.com/gnachman/iterm2/issues/3898#note_14097715
#!/bin/bash
# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux;
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It
# only accepts ESC backslash for ST.
function print_osc() {
if [[ -n $TERM ]] ; then
printf "\033Ptmux;\033\033]"
else
printf "\033]"
@zhoujiealex
zhoujiealex / gulpfile.js
Last active April 19, 2018 02:29
sample of gulpfile.js for hexo generate blog, compress public files
/* Refrences:
1. http://notes.iissnan.com/2016/publishing-github-pages-with-travis-ci
2. https://github.com/chrisjlee/hexo-theme-zurb-foundation/blob/e82f45a82bbaaee063bcb1298cd9793575afb142/gulpfile.js
3. https://github.com/gulpjs/gulp/blob/master/docs/recipes/delete-files-folder.md
4. https://hexo.io/api/
5. https://github.com/iissnan/theme-next-docs/blob/master/.travis.yml
*/
var gulp = require('gulp');
var minifycss = require('gulp-clean-css');