Skip to content

Instantly share code, notes, and snippets.

@Misaka-0x447f
Misaka-0x447f / index.md
Last active March 10, 2018 06:46
Git Repo On Server + Merge Permission Control

This documention are aim to introduce how to make some git repo like title described. This may useful for users who not want to make repo on some online service like github or gitlab due to very expensive costs.

#0 - Getting your server ready

First of all you absolutely need a server with a public address and a package manager. In this article I got a server with CentOS Linux release 7.3.1611 (Core) and I'm root.

Root isn't always harmful especially if not on a production server but you are recommended to come with a long enough password to keep root safe. (Don't worry to lost it at most time - you can always reset password on the server's dashboard.)

And, SSH client. Personally recommend MobaXterm. Putty is okay but please don't download it on some bad guy's website like baidu/360. Just go to the official site and download it, you will be safe.

@Misaka-0x447f
Misaka-0x447f / index.md
Last active March 14, 2018 14:38
SVN Server Getting Started

Introducing how to setup a SVN Server and how to Getting started.

#0 - Prepare your server

First of all you absolutely need a server with a public address and a package manager. In this article I got a server with CentOS Linux release 7.3.1611 (Core) and I'm root.

Root isn't always harmful especially if not on a production server but you are recommended to come with a long enough password to keep root safe. (Don't worry to lost it at most time - usually you can always reset password on the server's dashboard.)

And, SSH client. Personally recommend MobaXterm. Putty is okay but please don't download it on some bad guy's website like baidu/360. Just go to the official site and download it, you will be safe.

@Misaka-0x447f
Misaka-0x447f / 1_index.html
Last active July 25, 2018 05:11
async/await getting started in light speed
<script>
function succeedTarget(tip = false) {
let promise = new Promise((resolve, reject) => {
setTimeout(() => {
resolve({
result: "success",
data: "oo"
});
tip ? console.log("// resolve or reject won't exit your code") : {};
}, 500)
@Misaka-0x447f
Misaka-0x447f / index.md
Last active April 2, 2018 08:24
翻译:Avoid Large, Complex Layouts and Layout Thrashing

避免大型复杂布局和布局抖动

作者:Paul Lewis
译者:御坂 + Google Translate
原文:原文链接

布局是浏览器为元素定位的信息——它们在屏幕上的的大小和位置。根据它们的CSS、元素的内容或者父元素的内容,每一个元素都有其显式或隐式的布局信息。这个过程在Chrome,Opera,Safari和Internet Explorer中叫做Layout,而在Firefox中叫做Reflow,但过程相似。

类似于样式的计算,布局的计算消耗主要取决于:

  1. 需要布局的元素数量。
  2. 布局的复杂度。
@Misaka-0x447f
Misaka-0x447f / Fix_memory_problems.md
Last active May 19, 2018 06:13
翻译:Fix memory problems

修正内存问题

原始作者: Kayce Basques 译者:Misaka

这篇文章可以帮助你学习如何使用Chrome及其开发者工具来找到影响页面性能的、包括内存泄露、内存膨胀和过于频繁的gc(垃圾收集)等问题。

太长不看

  • 使用Chrome任务管理器找出你的页面当前使用了多少内存。
  • 使用时间线(Timeline)记录工具使内存使用可视化。
  • 使用内存堆快照(Heap Snapshots)定位孤立的DOM树(内存泄漏的通常成因)。
@Misaka-0x447f
Misaka-0x447f / gist:1e11d74c7a54c6f5a8420ff9aea954e9
Last active September 8, 2018 06:21
Press LWIN key in C#
public partial class Form1 : Form
{
[DllImport("user32.dll")]
private static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);
private const int KEYEVENTF_EXTENDEDKEY = 1;
private const int KEYEVENTF_KEYUP = 2;
public static void KeyDown(Keys vKey)
{
@Misaka-0x447f
Misaka-0x447f / updatePassword.tsx
Created October 15, 2018 01:42
Spaghetti_code example 请不要写出意大利面条式代码
import RichButton from 'components/InputField/RichButton'
import ButtonStyle from 'components/InputField/RichButton.scss'
import SingleLineTextField from 'components/InputField/SingleLineTextField'
import { t } from 'i18n'
import { uniqueId } from 'lodash'
import * as React from 'react'
import ReactCSSTransitionGroup from 'react-addons-css-transition-group'
import classes from './UpdatePassword.scss'
/* tslint:disable jsx-no-lambda */
@Misaka-0x447f
Misaka-0x447f / LetItDie.gpc
Last active March 8, 2019 00:32
Let It Die Floor 8 (meta-koya) auto farming script, start using at the floor 9; Required "Cronus Max"; Remember to lock your ps4 wallet with a password to prevent unexpected paid respawn caused by hunter(s).
/* *
* GPC SCRIPT
*
* GPC is a scripting language with C-like syntax.
* To learn more access GPC Language Reference on Help menu.
//
// 2019-01-5 20:42:00
// Combo generated by MAX Combo Plugin.
//----------------------------------------
@Misaka-0x447f
Misaka-0x447f / object_proxy.js
Created February 6, 2019 07:18
Javascript object proxy
const original = {
a: 1,
b: {
c: 1
}
}
const handler = {
get: (target, name) => {
return target[name];
@Misaka-0x447f
Misaka-0x447f / Light_ctrl.gpc
Created February 27, 2019 10:52
Light ctrl script for cronus
/* *
* GPC SCRIPT
*
* GPC is a scripting language with C-like syntax.
* To learn more access https://cronusmax.com/manual/cronus_instructions.htm
* *********************************************************** */
int current = 0;
init {