Skip to content

Instantly share code, notes, and snippets.

View peterkc's full-sized avatar

Peter Chanthamynavong peterkc

View GitHub Profile
@peterkc
peterkc / settings.json
Last active November 2, 2025 20:09 — forked from ljw1004/you_are_not_right.sh
A UserPromptSubmit hook for Claude Code to stop it saying "You're right"
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/you_are_not_right.sh"
}
]
{
"permissions": {
"allow": [
"Read(**)",
"Edit(**)",
"MultiEdit(**)",
"Write(**)",
"Glob(**)",
"Grep(**)",
"LS(**)",
@peterkc
peterkc / IntelliJ_IDEA__Perf_Tuning.txt
Created March 28, 2022 14:25 — forked from P7h/IntelliJ_IDEA__Perf_Tuning.txt
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
@peterkc
peterkc / .git-commit-template
Last active April 23, 2017 00:35 — forked from adeekshith/.git-commit-template.txt
This commit message template that helps you write great commit messages and enforce it across your team.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@peterkc
peterkc / idea64.exe.vmoptions
Created June 13, 2016 21:53 — forked from edwardbeckett/idea64.exe.vmoptions
Java 8 Intellij 64 JVM Options
-server
-Xms2g
-Xmx2g
-Xss16m
-XX:+UseConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled
-XX:ConcGCThreads=4
-XX:ReservedCodeCacheSize=128m
-XX:+AlwaysPreTouch
-XX:+TieredCompilation
# (<type>): <subject>
# <body>
# <footer>
# <type> should be one of the following:
#
# Fix - for a bug fix.

This is a short article on how we integrate stash and slack in openmind

First of all i assume you have:

  • a working stash installation
  • a repository you to notify slack on pushes
  • stash user with administration priviledges
  • full access to the server (linux) where stash is installed on
  • a team configured on slack
  • slack user with administration priviledges
@peterkc
peterkc / async.copy.js
Last active August 29, 2015 14:12 — forked from Floby/async.copy.js
#!/usr/bin/env node
var fs = require('fs');
var async = require('async');
async.parallel([
copyFile.bind(null, 'resources/file1.txt', 'resources/file1_copy.txt'),
copyFile.bind(null, 'resources/file2.txt', 'resources/file2_copy.txt'),
copyFile.bind(null, 'resources/file3.txt', 'resources/file3_copy.txt')
], function (err, results) {
CREATE OR REPLACE FUNCTION public.json_append(data json, insert_data json)
RETURNS json
LANGUAGE sql
AS $$
SELECT ('{'||string_agg(to_json(key)||':'||value, ',')||'}')::json
FROM (
SELECT * FROM json_each(data)
UNION ALL
SELECT * FROM json_each(insert_data)
) t;
@peterkc
peterkc / 0_reuse_code.js
Created February 24, 2014 09:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console