Skip to content

Instantly share code, notes, and snippets.

View rjungemann's full-sized avatar

Roger Jungemann rjungemann

View GitHub Profile
@ezy
ezy / sentry-raw.sh
Created April 29, 2019 02:20
CURL request to sentry without an SDK
# Replace <sentry_key>, <sentry-url> and <project-id> to formulate your CURL request. Don't forget to add a trailing slash to URL otherwise you'll get wierd CSRF errors!
curl -X POST --data '{ "exception": [{ "type": "$ErrorMessage"}] }' -H 'Content-Type: application/json' -H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=<sentry_key>, sentry_client=raven-bash/0.1" https://<sentry-url>/api/<project-id>/store/
@rjungemann
rjungemann / .bashrc
Created March 6, 2019 20:14 — forked from ae-s/.bashrc
Host-dependent automatic prompt colorization
# Set the gaudy prompt.
# ^O puts terminal back into default text mode for every prompt,
# preventing random glyphs.
resetterm="\[\017\]"
# \[ and \] prevent the shell from counting these characters
# against the line length.
@rjungemann
rjungemann / sqlite3-cheat-sheet.md
Last active May 31, 2018 02:33 — forked from vincent178/sqlite3-cheat-sheet.md
sqlite3 cheat sheet

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at [email protected] or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.

Goals

@dsample
dsample / README.md
Last active May 9, 2025 08:14
ASCII art diagrams

ASCI art characters for creating diagrams

Characters:

Single line

  • ASCII code 191 = ┐ ( Box drawing character single line upper right corner )
  • ASCII code 192 = └ ( Box drawing character single line lower left corner )
  • ASCII code 193 = ┴ ( Box drawing character single line horizontal and up )
  • ASCII code 194 = ┬ ( Box drawing character single line horizontal down )
clj -m cljs.main -re nashorn
(def thread (.type js/Java "java.lang.Thread"))

(let [global-atom-lock
      (let [ctor (.type js/Java "java.util.concurrent.locks.ReentrantLock")]
        (new ctor))]
@slightfoot
slightfoot / bottom_sheet.dart
Last active February 1, 2024 18:24
Modal Bottom Sheet with Input Fields fix for Flutter (Fix issue with overlap with keyboard and fix for tapping to dismiss)
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
@kpym
kpym / tkz-euclid-cheatsheet.en.md
Last active August 10, 2024 08:17
cheatsheet : tkz-euclid (latex library based on tikz)

Gist

Package

\usepackage{tkz-euclide} % checked for version 3.02c

Point definitions

@bryc
bryc / YamahaFM.md
Last active May 16, 2025 11:48
Collecting info on Yamaha FM soundchips
@VictorTaelin
VictorTaelin / promise_monad.md
Last active October 24, 2024 01:25
async/await is just the do-notation of the Promise monad

async/await is just the do-notation of the Promise monad

CertSimple just wrote a blog post arguing ES2017's async/await was the best thing to happen with JavaScript. I wholeheartedly agree.

In short, one of the (few?) good things about JavaScript used to be how well it handled asynchronous requests. This was mostly thanks to its Scheme-inherited implementation of functions and closures. That, though, was also one of its worst faults, because it led to the "callback hell", an seemingly unavoidable pattern that made highly asynchronous JS code almost unreadable. Many solutions attempted to solve that, but most failed. Promises almost did it, but failed too. Finally, async/await is here and, combined with Promises, it solves the problem for good. On this post, I'll explain why that is the case and trace a link between promises, async/await, the do-notation and monads.

First, let's illustrate the 3 styles by implementing