Skip to content

Instantly share code, notes, and snippets.

View mzvast's full-sized avatar
🎯
Focusing

mzvast mzvast

🎯
Focusing
View GitHub Profile
@mzvast
mzvast / Dockerfile
Created February 24, 2016 06:58
drupal7 docker image with write permission
FROM drupal:7
MAINTAINER mzvast <mzvast@gmail.com>
RUN usermod -u 1000 www-data
RUN usermod -G staff www-data
@mzvast
mzvast / example.make
Created March 8, 2016 15:04
自用drupal7 出门装,装了些常用模块,build直接运行drush make example.make .
core: 7.x
api: 2
projects:
drupal:
version: '7.43'
views_bulk_operations:
version: '3.3'
addressfield:
version: '1.2'
admin_menu:
@mzvast
mzvast / webpack.config.js
Created April 8, 2016 02:23 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
// Generated on 2014-07-08 using generator-angular 0.9.3
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
var modRewrite = require('connect-modrewrite');
@mzvast
mzvast / tmux-cheatsheet.markdown
Created June 18, 2016 17:24 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@mzvast
mzvast / install_tmux2.sh
Last active August 10, 2016 19:10 — forked from arttuladhar/install_ec2.sh
Install tmux2 on CentOS 6
# Installing tmux on CentOS 6
# If you don't have libevent install use wget to install the libevent and install
git clone https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar zxf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure & make install
# If you don't have curses install use yum to install the curses
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
"use strict";
// var angular = require('angular');
(function () {
var isFunction = angular.isFunction, isString = angular.isString;
function applyPairs(memo, keyValTuple) {
var key, value;
if (Array.isArray(keyValTuple))
key = keyValTuple[0], value = keyValTuple[1];
if (!isString(key))
throw new Error("invalid parameters to applyPairs");
@mzvast
mzvast / vue-jsx-flow-webpack.md
Last active August 13, 2018 03:41
vue jsx webpack flow config

依赖安装

yarn add -D \
babel-plugin-syntax-flow \
babel-plugin-transform-class-properties \
babel-plugin-transform-flow-strip-types \
babel-plugin-transform-es3-member-expression-literals \
babel-plugin-transform-es3-property-literals \
babel-plugin-transform-object-assign\
babel-plugin-transform-object-rest-spread \
@mzvast
mzvast / icafeMsg.js
Last active April 23, 2020 03:25
【油猴脚本】一键复制icafe单内容到剪贴板,形成git commit msg
// ==UserScript==
// @name iCode Helper
// @namespace http://tampermonkey.net/
// @version 1.3
// @description 一键复制iCafe单信息,形成Git Commit Msg,支持旧版迭代计划和工作台
// @author mzvast@gmail.com
// @match http://newicafe.baidu.com/*
// @grant none
// ==/UserScript==