Skip to content

Instantly share code, notes, and snippets.

View liulixiang1988's full-sized avatar

Lixiang Liu liulixiang1988

View GitHub Profile
@sorrycc
sorrycc / extract-sourcemap.mjs
Created March 31, 2026 08:57
Extract original source code from JavaScript .map (source map) files. Reads sourcesContent, skips node_modules, reconstructs the original file tree.
#!/usr/bin/env node
/**
* Extract original source code from a JavaScript source map file.
*
* Usage:
* node extract-sourcemap.mjs <path-to-.map-file> [output-dir]
*
* Example:
* node extract-sourcemap.mjs cli.js.map ./src-extracted
@vfarcic
vfarcic / nix.sh
Last active February 23, 2026 18:26
# Source: https://gist.github.com/vfarcic/8ebbf4943c5c012c8c98e1967fa7f33b
#####################################################################
# Say Goodbye to Containers - Ephemeral Environments with Nix Shell #
#####################################################################
# Additional Info:
# - Nix: https://nixos.org
# - Dagger: The Missing Ingredient for Your Disastrous CI/CD Pipeline: https://youtu.be/oosQ3z_9UEM
# Source: https://gist.github.com/28e2adb5946ca366d7845780608591d7
###########################################################
# Argo Workflows & Pipelines #
# CI/CD, Machine Learning, and Other Kubernetes Workflows #
# https://youtu.be/UMaivwrAyTA #
###########################################################
# Referenced videos:
# - Argo CD - Applying GitOps Principles To Manage Production Environment In Kubernetes: https://youtu.be/vpWQeoaiRM4
@tsjensen
tsjensen / gradle-jacoco-aggregated-report.md
Last active November 18, 2024 09:03
Gradle: Create a JaCoCo Report aggregating all subprojects

Create an Aggregated JaCoCo Report

The JaCoCo results from all subprojects shall be combined.

Requirements

  • Don't make any assumptions about where files are located in the build folders.
  • Refer to the sources of truth for getting at needed information.
  • Don't make any assumptions about which source sets are being tested. It might be main, but it might not.
  • Handle subprojects that don't JaCoCo.
@edoakes
edoakes / ray-cluster.yaml
Last active August 11, 2021 13:46
10-node AWS Ray cluster configuration
cluster_name: monte_carlo_pi
# The number of worker nodes to launch in addition to the head node.
min_workers: 9
max_workers: 9
provider:
type: aws
region: us-west-2
availability_zone: us-west-2a
@chanjarster
chanjarster / jvm-dashboard.json
Last active September 4, 2024 03:08
Grafana dashboard - JVM dashboard
{
"__inputs": [
{
"name": "VAR_JOB",
"type": "constant",
"label": "job",
"value": "java",
"description": ""
}
],
@LeoMarX
LeoMarX / gist:ef1fca2c67f04b15fe6a376fa9683232
Created December 19, 2016 08:45
常用计算机词汇表.md
@bcambel
bcambel / consist_hash.java
Created July 28, 2016 07:59
Consistent Hash Java implementation
import java.util.Collection;
import java.util.SortedMap;
import java.util.TreeMap;
public class ConsistentHash<T> {
private final HashFunction hashFunction;
private final int numberOfReplicas;
private final SortedMap<Integer, T> circle = new TreeMap<Integer, T>();
@liulixiang1988
liulixiang1988 / LambdaExpressionTree.cs
Created May 17, 2016 09:08 — forked from knjname/LambdaExpressionTree.cs
C#'s lambda expression tree.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
namespace LambdaExpressionTree
{