Skip to content

Instantly share code, notes, and snippets.

View changsijay's full-sized avatar
🐧
I may be slow to respond.

Jay Chang changsijay

🐧
I may be slow to respond.
  • Taiwan
View GitHub Profile
@ammarnajjar
ammarnajjar / plugins.yaml
Last active May 27, 2024 14:37
k9s plugin to pretty print json logs using jq
# $XDG_CONFIG_HOME/k9s/plugins.yaml
plugins:
jqlogs:
shortCut: Ctrl-J
confirm: false
description: "Logs (jq)"
scopes:
- pod
command: sh
background: false
@haircommander
haircommander / cri-o-kubeadm
Last active December 27, 2020 06:19
An /etc/default/kubelet file to quickly configure kubelet variables to use CRI-O with kubeadm
KUBELET_EXTRA_ARGS=--feature-gates="AllAlpha=false,RunAsGroup=true" --container-runtime=remote --cgroup-driver=systemd --container-runtime-endpoint='unix:///var/run/crio/crio.sock' --runtime-request-timeout=5m
function activeXDetect(e) {
return componentVersion = document.body.getComponentVersion("{" + e + "}", "ComponentID"),
null != componentVersion ? componentVersion : !1
}
function stripIllegalChars(e) {
for (t = "",
e = e.toLowerCase(),
i = 0; i < e.length; i++)
"\n" != e.charAt(i) && "/" != e.charAt(i) && "\\" != e.charAt(i) ? t += e.charAt(i) : "\n" == e.charAt(i) && (t += "n");
return t
@xrman
xrman / gist:4468f545b169969466bceb694d742dad
Created March 12, 2019 21:47
FastStone Capture Full Serial Key
Registration Code
Name : www.xyraclius.com
Serial : OOCRYIMDMDPWRETFPSUZ
@jschaf
jschaf / scratch_server.go
Created March 12, 2019 07:40
A Go web server from scratch using syscalls
package main
// Simple, single-threaded server using system calls instead of the net library.
//
// Omitted features from the go net package:
//
// - TLS
// - Most error checking
// - Only supports bodies that close, no persistent or chunked connections
// - Redirects
@weaming
weaming / boostnote2md.py
Last active August 7, 2023 09:51
Convert boostnote cson format data to markdown
#!/usr/bin/env python3
# coding: utf-8
"""
Author : weaming
Created Time : 2018-05-26 21:32:59
Prerequisite:
python3 -m pip install cson arrow
"""
import json
import os
@sistematico
sistematico / nginx.conf
Last active April 26, 2023 10:18
Windows 10 + Nginx + PHP FastCGI Service
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
@okitavera
okitavera / userChrome.css
Created January 24, 2018 12:09
Custom userChrome.css for firefox 57 for auto-hiding the navigation bar and bookmark bar
/* Auto-hide toolbar */
:root[uidensity=compact] #navigator-toolbox {
--nav-bar-height: 33px;
}
:root:not([uidensity]) #navigator-toolbox {
--nav-bar-height: 39px;
}
:root[uidensity=touch] #navigator-toolbox {
@styblope
styblope / docker-api-port.md
Last active July 6, 2024 15:33
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@shamil
shamil / rundeck_executions_cleanup.sh
Last active March 24, 2023 20:02
Rundeck executions cleanup
#!/bin/bash -e
# see related issue: https://github.com/rundeck/rundeck/issues/357
# export required vars
export RD_URL=http://localhost:4440 RD_USER=admin RD_PASSWORD=admin RD_HTTP_TIMEOUT=300
# make sure rd & jq commands are in the PATH
which -- rd jq >/dev/null
del_executions() {