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
@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 }],
@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 / 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 / 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
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: 'sprites@2x.png',
images » tree ~/Workspace/f2e-skeleton/src/images
.
└── sprites
├── hot.png
├── hot@2x.png
├── new.png
├── new@2x.png
├── wechat.png
└── wechat@2x.png
@laozhu
laozhu / xici.activity.testing.md
Last active August 29, 2015 14:20
西祠活动平台测试列表

发起活动

  • 发起活动时地图标注优化(添加详细地址自动标注)
  • 上传海报的图片替换,可拖动上传
  • 上传海报的功能尚且不可用
  • 请保证上传图片的质量,推荐16:9比例的图片样式调整
  • 限制人数需要增加单位 “人”
  • 编辑器加入分割线的功能
  • 增加活动报名时间开关
  • 活动小贴士的帖子整理
@laozhu
laozhu / tree.sh
Created April 11, 2015 14:49
tree command common usage.
tree -C --dirsfirst -I *.pyc
@laozhu
laozhu / package.json
Last active August 29, 2015 14:08
package.json of gulp test project
{
"name": "gulp-test",
"version": "1.0.0",
"description": "gulp test project",
"main": "gulpfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",