Skip to content

Instantly share code, notes, and snippets.

View clickCA's full-sized avatar
:dependabot:
computing

Chanakorn Aramsak clickCA

:dependabot:
computing
View GitHub Profile
@clickCA
clickCA / rechart.patch
Created June 11, 2026 16:42
pnpm patch for rechart
diff --git a/es6/cartesian/Brush.js b/es6/cartesian/Brush.js
index a9f9a69739963f40008567c696898473214fa5b4..18fb065a70900bbbf3a9d0000a44e6dce12a5010 100644
--- a/es6/cartesian/Brush.js
+++ b/es6/cartesian/Brush.js
@@ -1,3 +1,4 @@
+import { range } from 'es-toolkit/compat'
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Obj
db.user.updateOne(
{ _id: ObjectId("67611ccbf07d7da6773cdd02") },
{
$addToSet: {
locationCountryIds: {
$each: [
ObjectId("6760f74af3b8abfe4f92dd48"),
ObjectId("6760f74bf3b8abfe4f92dd49"),
ObjectId("6760f74bf3b8abfe4f92dd4a"),
ObjectId("6760f74bf3b8abfe4f92dd4b"),
#!/bin/bash
# Add user to sudoers
echo "Adding user to sudoers..."
su -c "usermod -aG sudo $USER" root
su -c "echo '$USER ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/$USER" root
# Update system
echo "Updating system..."
sudo apt-get update && sudo apt-get upgrade -y
{
"status": "OK",
"data": [
{
"YID": 8,
"YEAR": "2022",
"SEMESTERS": [
{
"SEMID": 10,
"CLASSES": [
<!DOCTYPE html>
<html>
<head>
<title>Sign Up Form</title>
<style>
body {
font-family: sans-serif;
text-align: center;
}
import hashlib
import itertools
import time
import sys
import os
# Function to generate substituted variants of a word
def generate_variants(word):
substitutions = {
'o': '0',
import hashlib
import itertools
def generate_variants(word):
substitutions = {
'o': '0',
'l': '1',
'i': '1'
}

Model Example

// Task.cs (Model)
public class Task
{
    public int Id { get; set; }
    public string Title { get; set; }
    public string Description { get; set; }
}

To run the command:

  1. Change directory to the folder that contains the input file grid-6-7.txt: cd /path/to/folder
  2. Optionally, replace grid-6-7.txt with another input file. Make sure that the file is located in the current directory.
  3. Run the command: time docker run -v $PWD:/input -v $PWD:/output clickads/powergrid:latest ./prog /input/grid-6-7 /output/out.txt

This command runs a Docker container that uses the clickads/powergrid image and sorts the specified input file from the /input directory to the /output/out.txt file. The time command is used to measure the execution time of the command.