Skip to content

Instantly share code, notes, and snippets.

View kwilczynski's full-sized avatar
🍀

Krzysztof Wilczyński kwilczynski

🍀
  • Yokohama, Japan
  • 15:43 (UTC +09:00)
View GitHub Profile
@kwilczynski
kwilczynski / dmesg.txt
Last active March 22, 2021 00:29
The amazing mini-PC S200 with i9-9880H from EGLOBAL
[ 5.250222] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[ 5.255513] ------------[ cut here ]------------
[ 5.255514] WARN_ON(!IS_PLATFORM(dev_priv, INTEL_SKYLAKE) && !IS_PLATFORM(dev_priv, INTEL_KABYLAKE))
[ 5.255562] WARNING: CPU: 3 PID: 518 at drivers/gpu/drm/i915/i915_drv.c:192 intel_pch_type+0x1f3/0x5f0 [i915]
[ 5.255563] Modules linked in: i915(+) snd_hda_intel snd_intel_nhlt snd_hda_codec drm_kms_helper snd_hda_core drm snd_hwdep snd_pcm i2c_algo_bit snd_timer fb_sys_fops snd syscopyarea intel_rapl_perf(+) sysfillrect sysimgblt soundcore input_leds intel_pch_thermal pcspkr intel_wmi_thunderbolt serio_raw topstar_laptop sparse_keymap acpi_pad acpi_tad fjes(-) mac_hid zcommon(PO+) znvpair(PO) spl(O) vhost_net vhost tap ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi sunrpc scsi_transport_iscsi ip_tables x_tables autofs4 xfs btrfs xor zstd_compress raid6_pq libcrc32c psmouse i2c_i801 r8169 ahci realtek libahci wmi video
[ 5.255579] CPU: 3 PID: 518 Comm:
kwilczynski@ubuntu:~$ grpcurl kw-alpha4.us-east1.apps.lbcs.io:443 describe
com.example.myservice.MyService is a service:
service MyService {
rpc AddItem ( .com.example.myservice.MyAddItem ) returns ( .google.protobuf.Empty ) {
option (.google.api.http) = { post:"/state/{user_id}/items/add" body:"*" };
}
rpc GetState ( .com.example.myservice.MyGetState ) returns ( .com.example.myservice.MyState ) {
option (.google.api.http) = { get:"/state/{user_id}" additional_bindings:<get:"/state/{user_id}/items" response_body:"items" > };
}
rpc RemoveItem ( .com.example.myservice.MyRemoveItem ) returns ( .google.protobuf.Empty ) {
@smallnest
smallnest / fork_and_daemon.go
Created April 20, 2020 06:52 — forked from wrfly/fork_and_daemon.go
golang fork and exec and handle signals
package main
import (
"flag"
"fmt"
"log"
"os"
"os/signal"
"syscall"
)
@kwilczynski
kwilczynski / test.md
Last active March 22, 2021 00:25
Scala documentation markdown italics issue

Problems with italics and the code blocks (inline or otherwie).

Given:

`test _test_`

```
test _test_
```
@kwilczynski
kwilczynski / ipvs-thundering-herd-3.0.patch
Last active March 22, 2021 00:23
Linux IPVS thundering herd mitigation
diff --git a/include/linux/ip_vs.h b/include/linux/ip_vs.h
index 4deb383..3d4e7af 100644
--- a/include/linux/ip_vs.h
+++ b/include/linux/ip_vs.h
@@ -27,6 +27,18 @@
#define IP_VS_DEST_F_AVAILABLE 0x0001 /* server is available */
#define IP_VS_DEST_F_OVERLOAD 0x0002 /* server is overloaded */
+ /*
+ * Advisory flags for slow start.
import (
"github.com/aelsabbahy/goss/outputs"
"github.com/aelsabbahy/goss/util"
)
func TestUseAsPackage(t *testing.T) {
output := &bytes.Buffer{}
// temp spec file
fh, err := ioutil.TempFile("", "*.yaml")
@zchee
zchee / ANSI.md
Created February 13, 2020 03:31 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1b
  • Decimal: 27
@kwilczynski
kwilczynski / test.c
Last active December 17, 2024 16:48
Test for AES NI in the CPU.
#include <stdio.h>
int main (int argc, char **argv)
{
unsigned int eax, ebx, ecx, edx;
asm(
"xchg{l}\t{%%}ebx, %1\n\t" \
"cpuid\n\t" \
"xchg{l}\t{%%}ebx, %1\n\t" \
@kwilczynski
kwilczynski / gist:cc0095d6e8b44698d08c4c6afb1a459b
Last active March 22, 2021 00:22
Muted Twitter words to disable Twitter's spam
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
suggest_grouped_tweet_hashtag
suggest_pyle_tweet
@alexellis
alexellis / expose-apiserver-kubernetes-inlets-pro.md
Last active December 27, 2022 04:10
Get `kubectl` access to your private cluster from anywhere