Skip to content

Instantly share code, notes, and snippets.

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
CKEDITOR.editorConfig = function( config ) {
config.toolbar = [
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
{ name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] },
'/',
{ name: 'links', items: [ 'Link', 'Unlink' ] },
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
'/',
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
{ name: 'insert', items: [ 'Table', 'HorizontalRule', 'SpecialChar'] },
@Sunnyztj
Sunnyztj / gist:bb4dfce420dde4da11a91fd66b6aacbe
Created October 16, 2019 00:20
Bootstrap 4 customize button color
2019 Update for Bootstrap 4
Now that Bootstrap 4 uses SASS, you can easily change the primary button color using the button-variant mixins:
.btn-danger {
@include button-variant($red, darken($red, 7.5%), darken($red, 10%), lighten($red,5%), lighten($red, 10%), darken($red,30%));
}
@Sunnyztj
Sunnyztj / gist:50a327db02005311e5c8ee5845df745e
Last active November 12, 2018 07:39
select2 in rails 5 => Javascript not executing
js:
$(document).on('turbolinks:load',function(){
$(document).ready(function(){
$("#modalBtn").click(function(){
$("#newProject").modal("show");
});
$("#newProject").on('show.bs.modal', function () {
flatpickr('#project_deadline_for_budget_preparation', {
altInput: true,
altFormat: "F j, Y",
安全->基本设置->安全性较低的应用
mail (mx) records -> mail.au.syrahost.com
subdomian records mail.screalestate.com.au -> mail.au.syrahost.com (CNAME RECORD)
mx record -> mxbiz1.qq.com and mxbiz2.qq.com
.page-clips .section-capture {
background: -webkit-linear-gradient(top, #1894e1, #241ca2);
background: linear-gradient(to bottom, #1894e1, #241ca2);
}
.page-clips .section-titles {
background: -webkit-linear-gradient(top, #1ad3bf, #11c36d);
background: linear-gradient(to bottom, #1ad3bf, #11c36d);
}
@Sunnyztj
Sunnyztj / gist:84cea18e700f5e6d2a04815498bcfc53
Created June 19, 2017 04:57
Dispatch Source Timer 的使用以及注意事项
https://skyline75489.github.io/post/2016-7-19_dispatch_source_timer_intro.html
@Sunnyztj
Sunnyztj / gist:995cc5588f6425257f78d89e2edd595e
Created June 16, 2017 04:49
计算 函数运行需要的时间
CFAbsoluteTime startTime =CFAbsoluteTimeGetCurrent();
.... Code ......
CFAbsoluteTime linkTime = (CFAbsoluteTimeGetCurrent() - startTime);
NSLog(@"Linked in %f ms", linkTime *1000.0);