Skip to content

Instantly share code, notes, and snippets.

View paulphys's full-sized avatar

paul paulphys

View GitHub Profile
@ConcurrentSquared
ConcurrentSquared / KCI_FI0029552691024_1.jpg
Last active September 29, 2023 20:12
LK-99 paper (Korean Journal of Crystal Growth) machine translation (Google) to English
KCI_FI0029552691024_1.jpg
@hibobmaster
hibobmaster / README.md
Last active May 19, 2024 21:23
Matrix (dendrite + element-web) in Docker with Traefik and federation

project structure

.
├── compose.yaml
├── config
│   └── dendrite.yaml
├── element-web
│   └── config.json
├── nginx
│   └── dendrite.conf
@nivethan-me
nivethan-me / README.md
Last active May 21, 2024 10:56
Setup a Next.js 13 project with Eslint + Prettier with automatic tailwind class sorting

Accounts I follow on YouTube

Got it from running below script:

let markdown = Array.from(document.querySelectorAll("ytd-channel-renderer"))
  .map((item) => ({
    title: item.querySelector("#text-container").textContent.trim(),
    url: item.querySelector("#main-link").href,
 }))
@degitgitagitya
degitgitagitya / .env
Last active May 19, 2024 20:24
Next JS + Next Auth + Keycloak + AutoRefreshToken
# KEYCLOAK BASE URL
KEYCLOAK_BASE_URL=
# KEYCLOAK CLIENT SECRET
KEYCLOAK_CLIENT_SECRET=
# KEYCLOAK CLIENT ID
KEYCLOAK_CLIENT_ID=
# BASE URL FOR NEXT AUTH
from typing import Dict, List, Mapping, Optional, Sequence, Set, Tuple, Union
from advent import Input
import re
from collections import defaultdict
from math import ceil, floor
input = (
Input(
day = 22,
# sample = True,
@agungjk
agungjk / [slug].js
Last active April 7, 2024 15:22
Crawler example on Vercel using Puppeteer and NextJS API routes
const puppeteer = require('puppeteer-core');
const cheerio = require('cheerio');
const chrome = require('chrome-aws-lambda');
export default async (req, res) => {
const slug = req?.query?.slug;
if (!slug) {
res.statusCode = 200
res.setHeader('Content-Type', 'application/json')
res.end(JSON.stringify({ id: null }))
@geohot
geohot / clang_fore.diff
Created July 30, 2020 01:08
Add support for "fore" loops to clang
diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h
index 13f265223..61b0a83c6 100644
--- a/clang/include/clang/AST/Stmt.h
+++ b/clang/include/clang/AST/Stmt.h
@@ -2459,13 +2459,16 @@ class ForStmt : public Stmt {
public:
ForStmt(const ASTContext &C, Stmt *Init, Expr *Cond, VarDecl *condVar,
Expr *Inc, Stmt *Body, SourceLocation FL, SourceLocation LP,
- SourceLocation RP);
+ SourceLocation RP, bool is_fore_statement=false);