Skip to content

Instantly share code, notes, and snippets.

View eoin-obrien's full-sized avatar

Eoin O'Brien eoin-obrien

View GitHub Profile
@abobija
abobija / esp-idf-on-wsl2.md
Last active April 13, 2024 04:57
ESP-IDF on WSL2 - Build, Flash and Monitor

ESP-IDF on WSL2 - Build, Flash and Monitor ⚡

Demo

How to setup ESP-IDF on WSL2 Ubuntu 20.04 - Config, Build and Flash

Intro

WSL2 still does not support USB devices, but with a little effort we can make possible to flash and monitor ESP device from WSL2.

@daniellwdb
daniellwdb / cacheMiddleware.ts
Last active June 14, 2022 17:25
Prisma cache middleware
import type { Prisma } from "@prisma/client"
import { redis } from "../redis"
type CacheMiddlewareOptions = {
model: Prisma.ModelName
action: Prisma.PrismaAction
keys?: string[]
defaultValues?: Record<string, unknown>
ttlInSeconds: number
}
@southpolesteve
southpolesteve / thoughts.md
Last active March 19, 2021 23:42
Random GraphQL+RDBMS+AWS Lambda Thoughts
  • GraphQL is awesome. I was not a fan at first, but I have since been converted. I wouldn't hesitate to use it for anything new. Its not perfect though.
  • Running on Lambda is pretty straight forward. We have our own custom code for that, but if I was starting fresh, I would use the Apollo GraphQL server. They have one that is designed to run on Lambda. I've played with it and it works well.
  • If your graphQL resolvers are talking directly to a DB, make sure to share connections between requests. One connection per lambda instance. If you spin up a new connection per request you will have a bad time. I guess this is generally true for not-graphql lambda things too.
  • You need dataloader. It will batch DB queries for you. It (or something like it) is pretty critical to making any graphQL setup performant. Or at least not overload your DB.
  • You proabably need to follow the Relay spec. We didn't d
@jakoch
jakoch / highlightjs-webworker.html
Created July 18, 2016 17:49
Highlight multiple chunks of code by using WebWorkers and Highlight.js
<html>
<head>
<title>highlight.js Code by using WebWorkers</title>
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/github.min.css">-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/monokai_sublime.min.css">
<script>
function highlight_code()
{
if (typeof (Worker) === undefined)
@woloski
woloski / multitenant.md
Last active February 11, 2024 23:14
Multi Tenant Apps in Auth0

Multitenancy refers to a principle in software architecture where a single instance of the software runs on a server, serving multiple client-organizations (tenants)

Let's start by enumerating some multi tenant applications and understand how they handle it.

Slack

Authentication:

@vikrum
vikrum / AndroidManifest.xml
Last active April 6, 2024 12:00
Firebase+Android sample app with background Service + local notifications.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.bgfirebaseapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="17" />
@leabdalla
leabdalla / laravel-windows-server-iis.md
Created August 1, 2013 21:43
How to use Laravel in Windows IIS

Laravel 4 in Windows Server IIS

###1. Put this web.config in laravel root diretory

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
		<defaultDocument>