Skip to content

Instantly share code, notes, and snippets.

View laozhu's full-sized avatar
👨‍💻
Coding ideas

Ritchie Zhu laozhu

👨‍💻
Coding ideas
View GitHub Profile
images » tree ~/Workspace/f2e-skeleton/src/images
.
└── sprites
├── hot.png
├── [email protected]
├── new.png
├── [email protected]
├── wechat.png
└── [email protected]
var gulp = require('gulp'),
spritesmith = require('gulp.spritesmith'),
merge = require('merge-stream');
// css sprite task
gulp.task('css:sprite', () => {
var spriteData = gulp.src(sources.sprites).pipe(spritesmith({
imgName: 'sprites.png',
imgPath: './src/images/sprites.png',
retinaImgName: '[email protected]',
@laozhu
laozhu / nginx.conf
Created June 2, 2017 15:38 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@laozhu
laozhu / pc-header.html
Last active November 7, 2018 07:58
Xici PC Header
<html lang="zh-Hans">
<head>
<meta charset="utf-8">
<title>西祠胡同</title>
<!-- 页面信息 -->
<meta name="description" content="西祠胡同(www.xici.net),是国内首创的网友“自行开版、自行管理、自行发展”的开放式社区平台,致力于为各地用户提供便捷的生活交流空间与本地生活服务平台。">
<meta name="keywords" content="南京西祠胡同,xici,南京生活社区,南京论坛,花嫁,亲子,汽车,旅游,摄影,房产,家居,财富">
<meta name="author" content="Xici Dev Team">
<meta name="copyright" content="西祠胡同">
@laozhu
laozhu / install-xcode-beta.md
Last active July 22, 2018 07:46
Install Xcode Beta

安装步骤:

  1. Download "Xcode Beta" from https://developer.apple.com/download/
  2. Unzip it and move it to /Applications (Waiting a long time...)
  3. Download "Command Line Tools for Xcode Beta" from https://developer.apple.com/download/more/
  4. Run the installer for "Command Line Tools"
  5. sudo xcode-select --switch path/to/Xcode-beta.app
  6. xcode-select --install
  7. /usr/bin/sudo /usr/sbin/softwareupdate --list --all
@laozhu
laozhu / babel.config.js
Last active January 30, 2019 15:08
My typescript project config memo
const isDev = process.env.NODE_ENV === 'development';
module.exports = {
sourceMaps: isDev ? 'inline' : true,
presets: [
['next/babel', { loose: true, useBuiltIns: 'usage' }],
[require('@babel/preset-typescript'), { isTSX: true, allExtensions: true }],
],
plugins: [
[require('@babel/plugin-proposal-decorators'), { decoratorsBeforeExport: false }],