Skip to content

Instantly share code, notes, and snippets.

View phantomk's full-sized avatar
🎯
Focusing

0xbc phantomk

🎯
Focusing
View GitHub Profile
@phantomk
phantomk / PKGBUILD Webstorm 10.0.3
Created November 18, 2015 02:38 — forked from anonymous/PKGBUILD Webstorm 10.0.3
PKGBUILD for AUR Archlinux package.
pkgname=webstorm
_pkgname=WebStorm
pkgver=10.0.3
_pkgver=141.1237
pkgrel=1
pkgdesc="JavaScript IDE and HTML editor."
arch=('i686' 'x86_64')
options=('!strip')
url="http://www.jetbrains.com/${pkgname}"
license=('custom')
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@phantomk
phantomk / settings.json
Last active June 21, 2018 02:59
VS code settings
{
"workbench.iconTheme": "vscode-icons",
// "cSpell.userWords": [
// "APPID",
// "APPSECRET",
// "CLOUDSTORE",
// "Eshine",
// "Evernote",
// "Paymentconfig",
// "Tuan",

Keybase proof

I hereby claim:

  • I am phantomk on github.
  • I am phantomk (https://keybase.io/phantomk) on keybase.
  • I have a public key whose fingerprint is A386 B9E0 D012 C36C B36B 671D BF4B 1C55 A2B6 2090

To claim this, I am signing this object:

@phantomk
phantomk / jest.config.js
Created October 12, 2018 17:04
ts-jest config
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
coverageDirectory: './coverage',
roots: [
'./test'
]
};
const getRandom = () => +(Math.random() * 1000).toFixed(0);
const asyncTask = taskID => new Promise(resolve => {
let timeout = getRandom();
console.log(`taskID=${taskID} start.`);
setTimeout(function () {
console.log(`taskID=${taskID} finished in time=${timeout}.`);
resolve(taskID)
}, timeout);
});
// need install json-bigint
const JSONBigInt = require('json-bigint')({'storeAsString': true});
try {
let response = await axios.put(this.apiBaseEndpoint + '/' + id, input, {
transformResponse: [data => data]
});
let data = JSONBigInt.parse(response.data);
} catch (error) {
@phantomk
phantomk / readme.md
Created December 10, 2018 12:02 — forked from iest/readme.md
Moving from lodash/fp to ramda

Moving from lodash/fp to ramda

How

Good news is we're only using lodash/fp, which makes it easier to match function signatures.

  1. Find most-used lodash methods, we'll convert these first maybe?
  2. Go through each lodash method, find the ramda equivalent where possible
  3. Write a codemod to rewrite those usages
  4. Who the fuck thought function aliases were a good idea
echo "CPU型号: "
sysctl -n machdep.cpu.brand_string
echo "CPU核心数: "
sysctl -n machdep.cpu.core_count
echo "CPU线程数: "
sysctl -n machdep.cpu.thread_count
echo "其它信息:"
@phantomk
phantomk / README.md
Last active February 3, 2019 06:26
Makedown here theme

markdown here 的主题,参考了李笑来的主题

优化:

  • 3 级标题起移除居中顶格
  • 列表样式为小黑点
  • 链接添加下划线以便识别

主题:

  • 清新绿
  • 活力橙