Migrate from MediaWiki to GitBook

Export data from MediaWiki Using ‘Special:Export’ to export all pages at MediaWiki Go to Special:Allpages and choose the desired article/file. Copy the list of page names to a text editor Put all page names on separate lines. I did this job with Vim. Go to Special:Export and paste all your page names into the textbox, […]

DA14580 advertises to a specify channel

For BLE, Channels 37, 38, and 39 are used only for sending advertisement packets. DA14580 advertises at channel 37, 38 and 39 in the example project from Dialog. But sometimes we need it advertises to a specify channel. Here are the channel define In the file co_bt.h ///Advertising channels enables enum adv_channel_map { ///Byte value […]

Simple script for J-Link RTT viewer

I debug NRF52 chip with JLink real time terminal. It’s pretty to use J-Link RTT viewer on my macOS. For example, I ran this command for open a RTT viewer window. you@yourcomputer:~$JLinkExe -device nRF52 -speed 4000 -if SWD -autoconnect 1 SEGGER J-Link Commander V5.10u (Compiled Mar 17 2016 19:06:22) DLL version V5.10u, compiled Mar 17 […]

Install extension for macOS built-in PHP

macOS High Sierra 10.13.3 ships with PHP 7.1.7. I’m trying to install an extension for the built-in PHP. I tried the pecl command but no lucky because SIP (System Integrity Protection) protection. I can’t add file under the directory /usr/lib/php that default php extension directory. It’s a little difficult but I installed an extension success […]


MediaWiki的 maintenance 目录下存放着维护脚本,记录一下。 createAndPromote.php 用于创建或者修改已经存在的用户。参数如下 php createAndPromote.php [–bureaucrat] [–sysop] [–bot] [–custom-groups=<group1>,<group2>] [–force] username [password] 示例 php createAndPromote.php –bureaucrat –sysop –custom-groups=developer WikiSysop mypassword


我有一个git仓库,其中master分支的代码已经落后几个月了,而另外一个blah分支却一直在持续提交。现在想把blah分支更名为master,同时也更新remote上的master。 这个操作似乎并不能用简单的git branch -m来解决。搜索发现也有不少人有类似需求,贴上解决方法。 方法一 如果blah分支能够快速merge到master分支,那么采用这个方法 git checkout seotweaks git merge -s ours master git checkout master git merge seotweaks 方法二 如果分支合并时出现了冲突,而你的remote仓库是github或者bitbucket,那么只能强上了 git branch -m master old-master git branch -m seotweaks master git push -f origin master 以上,我的情况只适合第二种,强上成功

配置windows上的git commit时的默认编辑器

在Win下使用github的Git Shell,每次commit时都会弹出记事本,使用不是太爽,想换成vim才顺手。操作步骤如下 安装gvim 将gvim的目录加入Path环境变量中,在 我的电脑 – 属性 - 高级 - 环境变量中修改 配置git git config –global core.editor gvim 重启Git Shell即可生效!