Skip to content

Instantly share code, notes, and snippets.

View mayocream's full-sized avatar
✨
我が名はめぐみん。紅魔族随一の魔法の使い手にして、爆裂魔法を操りし者。我が力、見るがいい!エクスプロージョン!

Mayo Takanashi mayocream

✨
我が名はめぐみん。紅魔族随一の魔法の使い手にして、爆裂魔法を操りし者。我が力、見るがいい!エクスプロージョン!
View GitHub Profile
@mayocream
mayocream / conf.user.json
Last active January 4, 2021 03:20
Typora
/** For advanced users. */
{
"defaultFontFamily": {
"standard": "Source Han Serif", //String - Defaults to "Times New Roman".
"serif": "Source Han Serif", // String - Defaults to "Times New Roman".
"sansSerif": "Source Han Sans", // String - Defaults to "Arial".
"monospace": "JetBrains Mono" // String - Defaults to "Courier New".
},
"autoHideMenuBar": false, //Boolean - Auto hide the menu bar unless the `Alt` key is pressed. Default is false.
@xiangchu0
xiangchu0 / os_transparent_proxy.md
Last active October 26, 2021 07:18
tproxy example

本文是对不同平台不同 IP packet 过滤程序透明代理实现的一些思考,主要考虑过滤规则以及如何在代理程序中获取客户端网络请求的原目标 IP 地址。

参数、函数的解释

dst_addr:所需获取的目标地址;

client_addr:客户端请求的源地址,可通过 accept() 获取;

local_addr:代理程序绑定的地址,在 bind() 调用中传入的地址;

log_printf():类比 printf(),只不过用来输出信息至日志文件,这里没有给出具体的实现。

@frkd-dev
frkd-dev / time_perf.c
Last active April 13, 2022 08:53
Measure performance for different time functions
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <time.h>
#include <sys/time.h>
/*
Build:
gcc -o time_perf time_perf.c
@progfay
progfay / isucon10_qualify_manual.md
Last active July 3, 2022 23:18
ISUCON10 予選マニュアル

ISUCON10 予選マニュアル

かならず、 ISUCON10 予選レギュレーション も併せてご確認ください。レギュレーションの内容と本マニュアルの内容に矛盾がある場合、本マニュアルの内容が優先されます。

はじめに

スケジュール

(時刻はすべて JST)

@starwing
starwing / timer.lua
Created November 18, 2015 08:56
A pure Lua timer implement for LuaJIT
local sleep, get_time
local math_floor = math.floor
if not jit then -- not LuaJIT?
return require "timer.c"
elseif jit.os == "Windows" then
local ffi = require "ffi"
ffi.cdef [[
void __stdcall Sleep(unsigned dwMilliseconds);
unsigned __stdcall GetTickCount(void);

Online Photo Editing - FabricJS Masking

A while ago I tried implementing a photo mask tool in MockoFun which is based on FabricJS

Check out an working example: https://jsfiddle.net/codingdude/sk84xLh2/

The solution I came up was combining the built in fabric.Image.filters.BlendImage filter with a custom FabricJS brush. Here's a glimpse at my implementation of that.

(function(){
@addozhang
addozhang / K8s-CKA-CAKD-Bookmarks.html
Created June 30, 2021 08:31
Bookmarks for K8s CKA CKAD
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<DT><H3 ADD_DATE="1619442857" LAST_MODIFIED="1621171927">K8s-CKA-CAKD-Bookmarks</H3>
<DL><p>
<DT><A HREF="https://kubernetes.io/docs/reference/kubectl/cheatsheet/" ADD_DATE="1573290265" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADbElEQVQ4jW2TS2xUdRjFz/f/35k7z86LAcaWBlDSEtBWSgUbUiIYTRtQ6yNRHkZDJBFNBMSNBq0kuNCYaAl1IbJwYcBqFETFKgmMEbAxausQpdQOpsVhOoxt58773v/9XNQ2LPytvvMl56zOAf6DmeXcDRBPDT2WL1tfF8rWCc79/ABugpkF/g/uhsbTg49nctap9/sNs7N7krsOTvNH5/KVXNH8jHO/dTFAN3vmBOevbM1Yi3d8esG85+SAhd+Thr0oKm1lM1JZJZsbgvTgXcBDba5vAtbIB+Rv7JsLYC7v6/tRf+vtvkmkMkUV8hFfy1ryyXt9KFcZfd8XEQtLNVVgWnqLV+59JIjNd1aeJ+k6TPxVh/732s8vdHYXmxb4y1bFJG0qr2j7Ri/aV7qgFPDtryUcO1fEwqBkm9k0TI/zi/3us7Ee530amncvSSTNJUa+RE31mmNDkwsNdU4MDJfpH0OhXGXMDwi891yYR9MWnfml5Lg4XMLQqFwe23Y4JuC
@zmmbreeze
zmmbreeze / analytics.js
Last active June 1, 2025 06:51
GA的源码 analytics.js
(function() {
/**
* 记录方法使用情况的类
* @param {Array.<boolean>} umMap 初始的使用情况
*/
var UsageManager = function(umMap) {
this.umMap = umMap || [];
};
/**
* 记录新的使用情况
@xezpeleta
xezpeleta / edgerouter_dns.md
Created January 22, 2019 12:11
Dynamic DNS on the Ubiquiti EdgeRouter X

Ubiquiti EdgeRouter X: custom dynamic DNS

ssh ubnt@<your-ip>
configure

Obtain your public IP address behind a NAT: using ipinfo.io

@Amir22010
Amir22010 / convert_voc_to_yolo.md
Created February 22, 2020 22:01 — forked from myounus96/convert_voc_to_yolo.md
convert pascal voc dataset to yolo format

Convert PascalVOC Annotations to YOLO

This script reads PascalVOC xml files, and converts them to YOLO txt files.

Note: This script was written and tested on Ubuntu. YMMV on other OS's.

Disclaimer: This code is a modified version of Joseph Redmon's voc_label.py

Instructions:

  1. Place the convert_voc_to_yolo.py file into your data folder.