Skip to content

Instantly share code, notes, and snippets.

View sgreben's full-sized avatar
💭
I may be slow to respond.

Sergey Grebenshchikov sgreben

💭
I may be slow to respond.
View GitHub Profile
@so0k
so0k / kubectl.md
Last active September 11, 2024 08:36
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@phiresky
phiresky / motioninterpolation.vpy
Last active October 9, 2024 00:41
Realtime motion interpolating 60fps playback in mpv
# vim: set ft=python:
# see the README at https://gist.github.com/phiresky/4bfcfbbd05b3c2ed8645
# source: https://github.com/mpv-player/mpv/issues/2149
# source: https://github.com/mpv-player/mpv/issues/566
# source: https://github.com/haasn/gentoo-conf/blob/nanodesu/home/nand/.mpv/filters/mvtools.vpy
import vapoursynth
core = vapoursynth.get_core()
@lukego
lukego / 0readme.md
Created August 16, 2015 16:25
Performance counter access with inline assembler in Lua
@mindscratch
mindscratch / test.go
Created July 20, 2015 11:36
test code that uses julienschmidt/httprouter
import "github.com/julienschmidt/httprouter"
import "net/http"
func doRequest(method, uri string, body *bytes.Buffer, handle httprouter.Handle) (*httptest.ResponseRecorder, error) {
resp := httptest.NewRecorder()
req, err := http.NewRequest(method, uri, body)
if err != nil {
return nil, err
}
@ivg
ivg / pv.ml
Last active August 21, 2022 01:48
open Lwt
let block_size = 256 * 4096
let ifd = Lwt_unix.stdin
let ofd = Lwt_unix.stdout
let print spd =
try_lwt
Lwt_io.eprintf "%s\r" (Speed.to_string spd)
with Speed.Undefined -> return_unit
@denji
denji / golang-tls.md
Last active November 7, 2024 05:58 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@willurd
willurd / web-servers.md
Last active November 13, 2024 13:44
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@jirutka
jirutka / analytics.conf
Created March 31, 2013 01:03
Add Google Analytics tracking code to HTML via nginx
#
# Add Google Analytics tracking code to HTML response
#
# Usage:
# set $tracking_id 'UA-12345678-9';
# include incl/analytics.conf;
#
# It needs nginx compiled with option --with-http_sub_module.
# Uses optimized GA code from: http://mathiasbynens.be/notes/async-analytics-snippet
#
@peichhorn
peichhorn / TinyMock.java
Created July 2, 2012 16:54
Tiny mocking framework (less that 100 LOC) that I've used to demonstrate dynamic proxies.
/*
* Copyright © 2012 Philipp Eichhorn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*