Skip to content

Instantly share code, notes, and snippets.

View wwerner's full-sized avatar

Wolfgang Werner wwerner

View GitHub Profile
@wwerner
wwerner / callouts.md
Last active September 25, 2023 12:45
Github Callouts

Note

Highlights information that users should take into account, even when skimming.

More than one line also work.

Important

Crucial information necessary for users to succeed.

Warning

Critical content demanding immediate user attention due to potential risks.

transparent-proxy

Reproducer for gr3p1p3/transparent-proxy#21

  • run yarn
  • run node index.js
  • run curl --proxy localhost:8888 --insecure --proxy-insecure -F "foo=bar" -F"baz=qux" https:/httpbin.org/anything form another shell
  • verify the result contains the form fields foo and baz and their values
  • Comment index.js:L34 and un-comment index.js:L38
  • restart the server

GraphQL introspection query via curl

cat introspection_query.json

{ 
  "query": "query IntrospectionQuery {
      __schema {
        queryType { name }
        mutationType { name }
@wwerner
wwerner / mermaid.md
Last active February 17, 2022 10:25
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
Monokai Pro Slack Theme
#2D2A2E,#121016,#FFD866,#2D2A2E,#272822,#D1D2D3,#A9DC76,#FF6188,#2D2A2E,#78DCE8
@wwerner
wwerner / embed gist.md
Created April 14, 2021 07:40 — forked from Albert-W/embed gist.md
embed gist in iframe

Embed gist in iframe

it is used to embed gist to an asynchronously-loaded web pages.

<iframe 
    width="100%"
    height="350"    
    src="data:text/html;charset=utf-8,
 
@wwerner
wwerner / grafana-postgres-datasource.yml
Created April 1, 2021 10:02
Example grafana datasource provisioning for postgreSQL
apiVersion: 1
datasources:
- name: Postgres
type: postgres
url: localhost:5432
database: grafana
user: grafana
secureJsonData:
password: "Password!"
import { useFishFn, usePond, useRegistryFish } from '@actyx-contrib/react-pond'
import * as React from 'react'
import { MachineFish } from '../fish'
import { MaterialRequestFish } from '../fish/materialRequestFish'
export const App = (): JSX.Element => {
const registry = useFishFn(MaterialRequestFish.registry, 1)
const allActiveMaterialReqs = useRegistryFish(MaterialRequestFish.registry(), Object.keys, MaterialRequestFish.of)
const pond = usePond()
@wwerner
wwerner / conda-default-env.yml
Created January 27, 2021 19:38
My conda default ML environment
name: sklearn mkl default
channels:
- defaults
dependencies:
- _py-xgboost-mutex=2.0=cpu_0
- appnope=0.1.0=py37_0
- attrs=19.3.0=py_0
- backcall=0.2.0=py_0
- blas=1.0=mkl
- bleach=3.1.5=py_0
@wwerner
wwerner / twitter-automute.js
Last active January 9, 2021 13:29
Mute Twitter accounts sending promotions
// This is neither elegant nor robust,
// but it _does_ mute everyone sending
// promoted tweets to my timeline.
// It works by installing a debounced
// scroll listener which checks for promoted tweets
// and mutes their sender by clicking the resp.
// tweet context menu action.
var xPathEvaluator = $x