Skip to content

Instantly share code, notes, and snippets.

View singlewind's full-sized avatar

Yue Zhou singlewind

  • Synkreate
  • Brisbane
View GitHub Profile

Keybase proof

I hereby claim:

  • I am singlewind on github.
  • I am yuezhou (https://keybase.io/yuezhou) on keybase.
  • I have a public key ASBBhXB-LcDkRCfpyGHhqinPrlQY-TpAqz9wgH7uM39Txgo

To claim this, I am signing this object:

#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# pidfile: /var/run/nginx.pid
@singlewind
singlewind / sql.update.txt
Created October 2, 2013 23:48
update user of database
EXEC sp_change_users_login 'Update_One', '[user]' , '[login]'
@singlewind
singlewind / mediafile.sitecore
Last active September 16, 2016 06:21
Friendly url of media file
https://community.sitecore.net/technical_blogs/b/sitecorejohn_blog/posts/sitecore-idiosyncrasies-media-urls
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<settings>
<setting name="Media.RequestExtension">
<patch:attribute name="value"></patch:attribute>
</setting>
<setting name="Media.MediaLinkPrefix">
<patch:attribute name="value">-/media</patch:attribute>
@singlewind
singlewind / ecm.role.controller
Created July 14, 2013 23:53
Sitecore ECM v2 Role Controller
Manager roots = Campaign Manager in version 1
Each Manager roots contains default settings etc. Includes page redirecting,
default roles and global opt-in and opt-out roles
In the email, if you have links from
sitecore/unsubscribe.aspx
sitecore/unsubscribefromall.aspx
The email generate pipeline will inject ec_camp and ec_as querystring into these
@singlewind
singlewind / common.regex
Created July 4, 2013 00:37
Common Regex
http://net.tutsplus.com/tutorials/other/8-regular-expressions-you-should-know/
1. Matching a Username
/^[a-z0-9_-]{3,16}$/
2. Matching a Password
/^[a-z0-9_-]{6,18}$/