Skip to content

Instantly share code, notes, and snippets.

View hudidit's full-sized avatar
🕹️
Learning

哈哈胡子 hudidit

🕹️
Learning
  • Hangzhou,China
View GitHub Profile
@hudidit
hudidit / c4-modified.js
Created May 27, 2020 03:23
C4 Modelling plugin for Draw.io. Forked from https://tobiashochguertel.github.io/c4-draw.io/ and made some modifications to suit my personal preferenes.
/**
* Changelog
* - 2020-05-27
* - Changed default geometries of some cells.
*/
/**
* Draw.io Plugin to create C4 Architecture Diagramms
*
* LOAD C4 SHAPE LIBRARY:
@hudidit
hudidit / index.html
Last active November 4, 2018 07:14
Promise vs. setTimeout JS Bin// source https://jsbin.com/cukasop
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">

How to setup Shadowsocks on your Ubuntu server

Your school or company network may block the access to a few specific websites. To solve this problem, I'd highly recommend Shadowsocks, since it is the easiest proxy tool I've ever found, and it's FREE (of course iff you have your own server running).

First, ssh to your server, and make sure you have Python and pip installed. If you have Python but not pip, install it using the following command

$ sudo apt-get install python3-pip
@hudidit
hudidit / countries.json
Created December 21, 2015 12:45 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@hudidit
hudidit / 21citylp-mobile.md
Last active August 29, 2015 14:02
21城市网(手机版)常用设置

1. 图片轮播

在发布文章时,给要放置在图片轮播位置的文章添加标签 mobile-slide即可。现在,图片轮播位置最多展示10篇文章,较旧的文章会被较新的文章替换掉。

可以在后台的 WPtouch Pro > 主题设置 > 一般 > 图片幻灯 设置展示的轮播数量,或者展示哪个分类/标签的文章。

@hudidit
hudidit / sea-debug-learning.js
Last active August 29, 2015 14:01
学习 Sea.js 源码,里面的中文注释是我的笔记。
/**
* Sea.js 2.1.0 | seajs.org/LICENSE.md
*/
(function(global, undefined) {
// Avoid conflicting when `sea.js` is loaded multiple times
if (global.seajs) {
return
}
@hudidit
hudidit / 21城市网新版主题文章发布指南.md
Last active August 29, 2015 13:59
21城市网新版主题文章发布指南

手机版相关设置请看21城市网手机版常用设置

21城市网新版主题文章发布指南

主要是针对首页,某些特定位置的文章需要按照一定规则来发布,才能准确显示在相应位置。

一、头条新闻

指显示在顶部导航栏下方、图片轮播上方的 4 条文章标题。

  • 加粗的一行绿色大字,文章需要添加标签:toutiao-1

#Debian安装MongoDB

-tags:Work


#安装 首先,添加key,在命令行里输入:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
@hudidit
hudidit / readme.txt
Created March 11, 2014 07:03
巴塞尔专题页面使用说明
一、专题页的全部文章都归于 special 分类。
二、巴塞尔钟表展的相关文章,全部要添加 basaier 这个标签(Tag)。
三、目前整个页面共分为 6 个段落(section),每个段落的文章都要添加与该段落相对应的 标签(Tag)。
每个段落与其标签的对应关系如下:
段落标题 标签
(1)图片轮播 section-1
(2)专家观潮 section-2
;(function( window, $ ){
var dir = window.colorbox_plugin_url;
$('head').eq(0).append(
$('<link/>').attr({
rel: 'stylesheet'
,href: dir + 'colorbox/colorbox.css'
})
);