Skip to content

Instantly share code, notes, and snippets.

View RobertMenke's full-sized avatar
🎯
Focusing

Robert Menke RobertMenke

🎯
Focusing
View GitHub Profile
@micalevisk
micalevisk / Dockerfile
Last active May 9, 2025 10:13
Production Dockerfile example for NestJS projects.
## ===========================================================> The common stage
FROM node:16.14 AS base
ENV NODE_ENV=production
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
## Remove unnecessary files from `node_modules` directory
@stleamist
stleamist / PageView.swift
Created May 19, 2020 11:08
A representation of UIPageViewController in SwiftUI.
import SwiftUI
struct PageView<Page: View>: UIViewControllerRepresentable {
var pages: [Page]
@Binding var currentPage: Int
func makeUIViewController(context: Context) -> UIPageViewController {
let pageViewController = UIPageViewController(transitionStyle: .scroll, navigationOrientation: .horizontal)
@jstheoriginal
jstheoriginal / SearchBar.swift
Created June 20, 2019 00:42
A simple SwiftUI search bar
struct SearchBar : View {
@Binding var searchText: String
var body: some View {
HStack {
Image(systemName: "magnifyingglass").foregroundColor(.secondary)
TextField(
$searchText,
placeholder: Text("Search")) {
UIApplication.shared.keyWindow?.endEditing(true)
@RobertMenke
RobertMenke / websocket-close-event-codes.js
Created September 9, 2018 14:44
Defines constants for all websocket close event codes that are used in practice
// Defines constants for all websocket close event codes that are used in practice
// Link: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
/**
* Normal closure; the connection successfully completed whatever purpose for which it was created.
*/
const NORMAL_CLOSURE = 1000
/**
* The endpoint is going away, either because of a server failure
@mariogt
mariogt / OpenEmu_Crash_OSXMojave_Fix.m
Last active September 2, 2021 00:25
Temporary fix for the Launch Crash of OpenEmu on Mac OS X 10.14 Mojave (Beta 5)
/*
Hi to all, I was testing openEmu in Mac OS X Mojave (Dev Beta 5), and did crash
immediately, then following the crash report:
Dyld Error Message:
Symbol not found: _OBJC_CLASS_$_IKCGRenderer
Referenced from: /Applications/OpenEmu.app/Contents/MacOS/OpenEmu
Expected in: /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/ImageKit
in /Applications/OpenEmu.app/Contents/MacOS/OpenEmu
@reborg
reborg / rich-already-answered-that.md
Last active May 12, 2025 12:44
A curated collection of answers that Rich gave throughout the history of Clojure

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content

@patpohler
patpohler / Big List of Real Estate APIs.md
Last active May 7, 2025 20:21
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

@keithpitty
keithpitty / tmux-ngrok.md
Last active December 15, 2023 16:24
Pairing with tmux and ngrok

Steps for Remote Pairing using tmux and ngrok

The following steps facilitate remote pairing using:

  • tmux which allows terminal sessions to be attached to different terminals, and
  • ngrok which provides secure tunnels to your localhost

1. Install tmux

OS X: brew install tmux

@zonble
zonble / KKSimplePlayer.swift
Created April 21, 2016 16:34
Using AudioQueue and Swift to do a simple stream player
import Foundation
import AudioToolbox
class KKSimplePlayer: NSObject {
var URL: NSURL
var URLSession: NSURLSession!
var packets = [NSData]()
var audioFileStreamID: AudioFileStreamID = nil
var outputQueue: AudioQueueRef = nil
var streamDescription: AudioStreamBasicDescription?
@kmark
kmark / AudioRecordActivity.java
Last active April 30, 2025 09:30
An example of how to read in raw PCM data from Android's AudioRecord API (microphone input, for instance) and output it to a valid WAV file. Tested on API 21/23 on Android and API 23 on Android Wear (modified activity) where AudioRecord is the only available audio recording API. MediaRecorder doesn't work. Compiles against min API 15 and probabl…
/*
* Copyright 2016 Kevin Mark
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software