Skip to content

Instantly share code, notes, and snippets.

View liulixiang1988's full-sized avatar

Lixiang Liu liulixiang1988

View GitHub Profile
@vfarcic
vfarcic / nix.sh
Last active September 1, 2024 05:40
# 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 March 29, 2024 14:32
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
{
@dzlab
dzlab / go_sftp.go
Created May 6, 2016 10:38
an example of sftp in golang
package main
import (
"github.com/pkg/sftp"
"golang.org/x/crypto/ssh"
)
func main() {
addr := “my_ftp_server:22"
config := &ssh.ClientConfig{