Skip to content

Instantly share code, notes, and snippets.

💬
Commenting

Peng Lyu rebornix

💬
Commenting
Block or report user

Report or block rebornix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rebornix
rebornix / selection.md
Last active Oct 18, 2016
Manual Test: Selection
View selection.md

Go to definition

Open a TypeScript project, or whatever project whose language supports it. Move cursor to a symbol which is defined elsewhere, press F12, move hjkl to see if the cursor is positioned correctly.

Windows/Tabs

  1. Open the same file in two Group Editors by clicking Split Editor button. Switching between these two windows by pressing <C-w> hl or using Mouse. After switching window, press hjkl to see the cursor position is updated correctly.
  2. Open different files in two Group Editors. Other steps are the same as above.

Visual selection

Make sure visual selection still works by pressing "go to matching brace" % command.

View pre-commit
#!/bin/sh
pass=true
RED='\033[1;31m'
GREEN='\033[0;32m'
NC='\033[0m'
echo "Running Linters:"
@rebornix
rebornix / private.xml
Created Jul 8, 2016 — forked from Eric-Guo/private.xml
Karabiner private.xml for Topre REALFORCE 87U on rMBP
View private.xml
<?xml version="1.0"?>
<root>
<item>
<name>For Topre REALFORCE 87u Users</name>
<devicevendordef>
<vendorname>TopreCorporation</vendorname>
<vendorid>0x0853</vendorid>
</devicevendordef>
<item>
<name>Fix FN + F1..F12 and functional keys</name>
@rebornix
rebornix / app.js
Created May 26, 2016
json content breaks vs code
View app.js
var test = `
{"results":[{"extensions":[{"publisher":{"publisherId":"a5c25faf-bf60-4941-81b9-9a852b96c5fb","publisherName":"ms-vscode","displayName":"ms-vscode","flags":"none"},"extensionId":"c3c225bf-758d-4db6-9341-00952baff6dd","extensionName":"node-debug","displayName":"Node Debug","flags":"validated, public","lastUpdated":"2016-04-26T16:14:04.087Z","publishedDate":"2015-11-22T07:57:09.457Z","shortDescription":"%extension.description%","versions":[{"version":"0.0.2","flags":"validated","lastUpdated":"2016-04-26T16:14:04.557Z","assetUri":""},{"version":"0.0.1","flags":"validated","lastUpdated":"2015-11-22T07:57:09.79Z","assetUri":""}],"categories":["Debuggers"],"tags":["vscode"],"statistics":[{"statisticName":"install","value":1574},{"statisticName":"trendingdaily","value":7.013358778625954},{"statisticName":"trendingmonthly","value":90.17175572519083},{"statisticName":"trendingweekly","value":38.57347328244275}]},{"publisher":{"publisherId":"a5c25faf-bf60-4941-81b9-9a852b96c5fb","publisherName":"rebornix",
@rebornix
rebornix / logstash.conf
Created Jan 15, 2016
Logstash configuration for IIS log.
View logstash.conf
input {
file {
type => "IISLog"
path => "C:/inetpub/logs/LogFiles/W3SVC*/*.log"
start_position => "beginning"
}
}
filter {
@rebornix
rebornix / threecastinandroid.md
Last active Oct 26, 2015
How to subscribe Three Cast Podcast in Android
View threecastinandroid.md

这里我们拿 Android 上一款开源的播客播放器 AntennaPod 举例。

首先打开客户端,点击左上角的菜单按钮,选择 添加博客 step 1

然后在添加播客URL处,填入我们的地址http://three.sh/feed.xml,点击确定 step 2

最后进入到三人行播客的介绍页面,点击订阅就可以收听我们的播客啦! step 3

@rebornix
rebornix / q.ts
Created Aug 4, 2015
Angular $q written in typescript (draft)
View q.ts
interface PromiseState {
status: number;
}
class Promise {
$$state: PromiseState;
constructor() {
this.$$state = { status : 0 };
}
then(onFulfilled, onRejected, progressBack) {
var result = new Deferred();
@rebornix
rebornix / soparser.js
Last active Aug 29, 2015
Extract information from Stack Overflow question with Noodlejs
View soparser.js
var query = {
url: 'http://stackoverflow.com/questions/31095166/angular-mocha-tests-fail-when-i-add-multiple-controllers-to-the-same-module',
type: 'html',
map: {
title: {
selector: "#question-header h1 a",
extract: "text"
},
description: {
selector: ".question .postcell .post-text",
@rebornix
rebornix / index
Created Jun 2, 2015
Download Trend
View index
<!DOCTYPE html>
<html>
<head>
<title>d3.tip.js - Tooltips for D3</title>
<meta charset="utf-8" />
<title>Bar Chart</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script>
<script type="text/javascript" src="../index.js"></script>
<script type="text/javascript">
data = [{"total":1225, "date": "5.1"},{"total":279, "date": "5.2"},{"total":212, "date": "5.3"},{"total":335, "date": "5.4"},{"total":329, "date": "5.5"},{"total":234, "date": "5.6"},{"total":175, "date": "5.7"}, {"total":1225, "date": "5.1"},{"total":279, "date": "5.2"},{"total":212, "date": "5.3"},{"total":335, "date": "5.4"},{"total":329, "date": "5.5"},{"total":234, "date": "5.6"},{"total":175, "date": "5.7"}, {"total":1225, "date": "5.1"},{"total":279, "date": "5.2"},{"total":212, "date": "5.3"},{"total":335, "date": "5.4"},{"total":329, "date": "5.5"},{"total":234, "date": "5.6"},{"total":175, "date": "5.7"}, {"total":1225, "date": "5.1"},{"total":279, "date": "5.2"},{"total":212,
View badgeFactory
public Bitmap Draw(Color subjectCol, string subjectStr, Color statusCol, string statusStr) {
var fullHeight = 0;
var fullWidth = 0;
var padding = 8;
var shadowOffset = 5;
var font = new Font("Segoe UI", 100, GraphicsUnit.Pixel);
var maxWidth = (subjectStr.Length + statusStr.Length) * 100 + 4 * padding;
Bitmap bitmap = new Bitmap(maxWidth, 200);
using (Graphics g = Graphics.FromImage(bitmap))
You can’t perform that action at this time.