Skip to content

Instantly share code, notes, and snippets.

@leiless
leiless / uv_pipe_ipc_echo.c
Created July 11, 2020 07:55
libuv pipe IPC echo client/server example
/*
* Created Jul 4, 2020.
*/
#include <unistd.h>
#include <uv.h>
#include "test.h"
#include "utils.h"
#include "assertf.h"
@wcarhart
wcarhart / bash_tidbits.md
Last active February 23, 2026 06:22
Helpful Bash design patterns

Helpful Bash tidbits

@bszeti
bszeti / kubernetes-it-pipeline-podtemplate.groovy
Last active September 28, 2023 11:23
Integration test on Kubernetes with Jenkins pipeline :: Pipeline podTemplate basics
podTemplate(
label: 'app-users-it',
cloud: 'openshift', //This needs to match the cloud name in jenkins-kubernetes-plugin config
containers: [
//Jenkins agent. Also executes the integration test. Having a 'jnlp' container is mandatory.
containerTemplate(name: 'jnlp',
image: 'registry.access.redhat.com/openshift3/jenkins-slave-maven-rhel7:v3.9',
resourceLimitMemory: '512Mi',
args: '${computer.jnlpmac} ${computer.name}',
envVars: [
@hkjpotato
hkjpotato / react-redux-simple.js
Last active January 14, 2023 09:42
simple implementation of react-redux
import React from 'react'
import { PropTypes } from 'react'
const storeShape = PropTypes.shape({
subscribe: PropTypes.func.isRequired,
dispatch: PropTypes.func.isRequired,
getState: PropTypes.func.isRequired
})
const subscriptionShape = PropTypes.shape({
trySubscribe: PropTypes.func.isRequired,
notifyNestedSubs: PropTypes.func.isRequired
@zupzup
zupzup / main.go
Created March 20, 2017 10:03
Go TCP Proxy / Port Forwarding Example (https://zupzup.org/go-port-forwarding/)
package main
import (
"flag"
"fmt"
"io"
"log"
"net"
"os"
"os/signal"
@dmfutcher
dmfutcher / server.asm
Created July 27, 2015 18:37
TCP Echo server in x86_64 assembly, using Linux system calls.
;; Simple TCP echo server in x86_64 assembly, using Linux syscalls
;;
;; nasm -felf64 -o server.o server.asm
;; ld server.o -o server
;; ./server
;;
global _start
;; Data definitions
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@pete
pete / 0-README
Last active February 10, 2024 07:12
Various implementations of the 'cat' command, for comparison.
I turned this gist into a "real" repository. It is here: https://github.com/pete/cats .
Here, placed side-by-side for comparison, are GNU's implementation of
cat, Plan 9's implementation, Busybox's implementation, and NetBSD's
implementation, Seventh Edition Unix (1979), and 4.3BSD.
For good measure (and because I suppose I am now committed to collecting
cats) also included are Second Edition Unix (in assembly) and Inferno's
implementation (in Limbo) for good measure.