Skip to content

Instantly share code, notes, and snippets.

View xiaohk's full-sized avatar
🐐
Mr. King Chivo

Jay Wang xiaohk

🐐
Mr. King Chivo
View GitHub Profile
@xiaohk
xiaohk / paper-revision-markup.md
Last active November 29, 2023 00:05
Mark up paper revisions in LaTeX

How to Mark Up Paper Revisions with LaTeX

Below are three steps to highlight changes made in a paper revision with LaTeX.

Step 1. Generate a submission snapshot

We first take a snapshot of the last version of the LaTeX project before the paper's original submission. If you use Git to version control your project, it is easy to checkout the exact version used for the original submission.

  1. Use latexpand to flatten the LaTeX structure. It combines all LaTeX files into one file.
@xiaohk
xiaohk / how-to-make-taps-happy.md
Last active March 19, 2024 07:50
how-to-make-taps-happy

How To Make ACM TAPS Happy?

Here are some tips and tricks to make ACM TAPS stop complaining about your LaTeX source submission.

1. Only use ACM permitted packages

Remove all packages that are not listed in this webpage.

2. Add short description for \caption commands

@xiaohk
xiaohk / deploy.md
Last active February 25, 2023 08:13
Deploy to gh-pages
@sindresorhus
sindresorhus / esm-package.md
Last active July 5, 2024 10:12
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@chris
chris / apigateway-dynamo_serverless.yml
Last active December 17, 2021 05:14
Serverless Framework config file for creating API Gateway to DynamoDB proxy
service: my-api
org: CompanyName
# You can pin your service to only deploy with a specific Serverless version
# Check out our docs for more details
# frameworkVersion: "=X.X.X"
frameworkVersion: '>=2.1.1 <3.0.0'
custom:
defaultStage: dev
@xiaohk
xiaohk / arxiv-preparation.md
Last active July 3, 2024 11:44
Prepare for an arXiv submission

Submission Steps

  1. Download source code from Overleaf if you use it: menu -> download -> source.

  2. Strip comments and combine all tex files (f01-main.tex, f02-intro.tex, etc.) into one file arxiv_main.tex.

# Replace f01-main.tex with the main tex file in your overleaf project
latexpand --empty-comments f01-main.tex > arxiv_main.tex
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@minutiae
minutiae / tailwind_color_variables.scss
Created October 8, 2018 20:26
Tailwind CSS colors as Sass variables
$black: #22292f;
$grey-darkest: #3d4852;
$grey-darker: #606f7b;
$grey-dark: #8795a1;
$grey: #b8c2cc;
$grey-light: #dae1e7;
$grey-lighter: #f1f5f8;
$grey-lightest: #f8fafc;
$white: #fff;
$red-darkest : #3b0d0c;
@dikiaap
dikiaap / git-io-custom-url.md
Last active June 19, 2024 01:26
git.io custom URL

Update: As of 11 January 2022, git.io no longer accepts new URLs.

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
@fukaz55
fukaz55 / trackobot-post-test.php
Last active December 19, 2018 06:08
track-o-botに戦歴をPOSTするテストスクリプト
<?php
/* お手本:https://gist.github.com/stevschmid/120adcbc5f1f7cb31bc5 */
$api = 'https://trackobot.com/profile/results.json';
$username = 'username';
$token = 'YOUR_API_TOKEN';
$headers = array(
'Content-Type: application/json',
'Authorization: Basic ' . base64_encode("{$username}:{$token}") /* BASIC認証用のヘッダを生成 */
);