Skip to content

Instantly share code, notes, and snippets.

@yyandrew
yyandrew / ansistrano-build.yml
Last active November 3, 2023 23:28
Scripts to deploy react app by ansistrano
# .ansistrano/build.yml
- shell: cd "{{ ansistrano_deploy_to }}/current" && npm install
- shell: cd "{{ ansistrano_deploy_to }}/current" && npm run build
- shell: sudo chgrp -R nginx "{{ ansistrano_deploy_to }}/current/"
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'https://github.com/rking/ag.vim.git'
PrePush:
RuboCop:
enabled: true
command: ['bundle', 'exec', 'rubocop']
RSpec:
enabled: true
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@yyandrew
yyandrew / set-up-l2tp-ipsec-vpn-on-debian.md
Last active June 9, 2017 03:42 — forked from mietek/set-up-l2tp-ipsec-vpn-on-debian.md
Set up L2TP/IPsec VPN on Debian

Set up L2TP/IPsec VPN on Debian

Set up IPsec

Set up networking

#include "keymap_common.h"
#include "led.h"
#include "action_layer.h"
/*
* HHKB Layout
*/
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: Default layer
* ,-----------------------------------------------------------.
#!/bin/bash
#OpenVPN Server on CentOS OpenVZ VPS Script by Yasyf Mohamedali (http://blog.yasyf.com/2012/08/01/openvpn-server-on-a-centos-openvz-vps)
#Adapted from various scripts around the net, including http://www.openvz.ca/blog/2010/11/18/setup-tuntap-openvpn-server-openvz-5-minutes/
#https://gist.github.com/3230440
tunstate=`cat /dev/net/tun`
if [ "$tunstate" = "cat: /dev/net/tun: Permission denied" ]
then
clear
echo "Sorry, but it seems that TUN/TAP is not enabled on your VPS."
exit
# 生成公钥,一路回车到底
ssh-keygen -t rsa
# 上传公钥
cat ~/.ssh/id_rsa.pub | ssh user@host "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
unbind C-s
set -g status on
set -g prefix C-a
set additional_escapes tmux
set -g base-index 0
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# retain current PWD when open new window
@yyandrew
yyandrew / .vimrc
Last active August 29, 2015 14:12
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'https://github.com/rking/ag.vim.git'
Plugin 'https://github.com/mattn/gist-vim.git'
Plugin 'https://github.com/mattn/webapi-vim.git'
Plugin 'https://github.com/Yggdroot/indentLine.git'
Plugin 'https://github.com/yegappan/mru.git'