Skip to content

Instantly share code, notes, and snippets.

View XadillaX's full-sized avatar
🦧
A mess.

Khaidi Chu XadillaX

🦧
A mess.
View GitHub Profile

JavaScript Runtime Engineer

Minimum qualifications

  • Bachelor's degree in Computer Science or related field, or equivalent practical experience;
  • Computer Science knowledge such as Operating System, Data Structure, etc;
  • One of:
    • Experience as a senior Node.js developer;
    • Experience as a C / C++ developer under Linux / macOS;
  • Understanding JavaScript programming language.
@XadillaX
XadillaX / hua.js
Last active September 29, 2021 09:04
hua.js
This file has been truncated, but you can view the full file.
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["__swb__"] = factory();
else
root["__swb__"] = factory();
})(globalThis, function() {
@XadillaX
XadillaX / require.js
Created November 27, 2015 05:25
Hack require demo
"use strict";
var fs = require("fs");
var path = require("path");
var Module = require("module");
var _resolveFilename = Module._resolveFilename.bind(Module);
var cache = {};
var SRC_PATH = path.resolve(__dirname, "../");

  Trusted 是一個代碼解謎遊戲,用 Javascript 來過關的。

  昨天凌晨花了仨小時通關了這個遊戲,在這裏就粗粗做一下題解吧,好幾題都是 Hack 過去的。(不要臉,( ゚Д゚)σ

Ceil Block A

  這有點像教學關吧,總之先拿到那臺電腦你就能操作了。拿到電腦後你就能修改地圖內部黑色底色的代碼了。

  這個時候你只需要把中間設置牆的代碼去掉就可以了,或者註釋掉:

原文地址:https://xcoder.in/2015/08/10/mysql-binlog-try/

  花瓣网的搜索架构需要重构,尤其是在索引建立或者更新层面。

  目前的一个架构导致的结果就是时间越久,数据本体与搜索引擎索引中的数据越不同步,相差甚大。

  新的一个架构打算从 MySQL 的 Binlog 中读取数据更新、删除、新增等历史记录,并把相应信息提取出来丢到队列中慢慢去同步。

  所以我就在这里小小去了解一下 Binlog。

@XadillaX
XadillaX / node_skeleton.cxx
Created November 27, 2014 08:54
Node.js C++ addon skeleton.
#include <node.h>
#include <v8.h>
#include <cstdio>
#include <iostream>
#include <cstdlib>
#include <string>
#include <cstring>
using namespace std;
Handle<Value> ExportFunction(const Arguments& args)
@XadillaX
XadillaX / 1111.js
Created November 10, 2014 09:53
1111
//javascript; chrome only
゚ω゚ノ= /`m´)ノ ~┻━┻ //*´∇`*/ ['_']; o=(゚ー゚) =_=3; c=(゚Θ゚) =(゚ー゚)-(゚ー゚); (゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ :(゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ:((゚ー゚==3) +'_')[゚ー゚] }; (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚]; (゚ー゚)+=(゚Θ゚); (゚Д゚)[゚ε゚]='\\'; (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];(゚Д゚) [゚o゚]='\"';(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚
@XadillaX
XadillaX / mysql-daemon.js
Created October 15, 2014 15:23
MySQL Daemon in ACM.NBUT.EDU.CN
var exec = require("child_process").exec;
function check() {
exec("pgrep mysql", function(err, stdout, stderr) {
if(err) {
if(err.message.indexOf("Command failed") !== -1) {
console.log("Restarting mysqld...");
return exec("service mysqld start", function(err, stdout, stderr) {
if(err) console.log(err);
if(stdout) console.log(stdout);
@XadillaX
XadillaX / word_count.clj
Created July 18, 2014 09:45
Storm starter for clojure.
;; Licensed to the Apache Software Foundation (ASF) under one
;; or more contributor license agreements. See the NOTICE file
;; distributed with this work for additional information
;; regarding copyright ownership. The ASF licenses this file
;; to you under the Apache License, Version 2.0 (the
;; "License"); you may not use this file except in compliance
;; with the License. You may obtain a copy of the License at
;;
;; http://www.apache.org/licenses/LICENSE-2.0
;;
(println ((fn
[n]
(take n (fn fib
([] (concat [1 1] (fib 1 1)))
([x1 x2]
(let [x3 (+ x1 x2)]
(lazy-seq
(cons x3 (fib x2 x3)))))))) 3))