Skip to content

Instantly share code, notes, and snippets.

View tobiasmuehl's full-sized avatar
🌴
Enjoying the sun

Tobias Mühl tobiasmuehl

🌴
Enjoying the sun
View GitHub Profile
@tobiasmuehl
tobiasmuehl / install.sh
Created November 14, 2022 04:20
Reset event data of a self-hosted Sentry installation (but keeping DSNs, user config, etc). Edit the stock install.sh file to remove some lines, making it look more like this file
#!/usr/bin/env bash
set -e
# Pre-pre-flight? 🤷
if [[ -n "$MSYSTEM" ]]; then
echo "Seems like you are using an MSYS2-based system (such as Git Bash) which is not supported. Please use WSL instead.";
exit 1
fi
source "$(dirname $0)/install/_lib.sh" # does a `cd .../install/`, among other things
@tobiasmuehl
tobiasmuehl / install-docker-compose2-ubuntu.sh
Last active August 11, 2023 07:44
Installs Docker Compose 2 on a Debian-based distro (Ubuntu) completely unattended. *Deprecated* Docker install shell script already includes compose now!
#!/bin/bash
apt install -y jq curl
COMPOSE_VER=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/docker/compose/releases/latest | jq -r '.name' | grep -oP "v[0-9]+(\.[0-9]+)+$")
mkdir -p ~/.docker/cli-plugins/
OS=$(uname -s)
curl -SL https://github.com/docker/compose/releases/download/$COMPOSE_VER/docker-compose-${OS,,}-$(uname -m) -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose

Keybase proof

I hereby claim:

  • I am tobiasmuehl on github.
  • I am muehlio (https://keybase.io/muehlio) on keybase.
  • I have a public key ASDJaB5z8q9w5to4xFIfQHNU3T0tb_avY-sy9evp9PfHTgo

To claim this, I am signing this object:

@tobiasmuehl
tobiasmuehl / fb-expand-all.js
Last active March 24, 2024 06:53
Copy this in your developers console to expand all posts and comments on a Facebook page
// 1. Scroll to bottom of the FB page to load all posts
// 2. Copy jQuery into the dev console, so that $ becomes available
// 3. Execute this script, which will expand all posts, comments and comments replies
// 4. Rerun to make sure every post/comment is picked up (after console.log is not logging more events)
// reset array
window.a = [];
// fill with links
$('.UFIPagerLink, .UFIReplySocialSentenceLinkText').add('div.userContent .see_more_link').add('div.userContent .see_more_link').each(function() { window.a.push(this) });
> react-hot-boilerplate@1.0.0 start D:\Work\OriginalOrCopy\react-hot-boilerplate
> node server.js
Listening at http://localhost:3000/
Hash: 014e3109713f89641db3
Version: webpack 1.13.1
Time: 566ms
Asset Size Chunks Chunk Names
bundle.js 275 kB 0 [emitted] main
> react-hot-boilerplate@1.0.0 start D:\Work\OriginalOrCopy\react-hot-boilerplate
> node server.js
Listening at http://localhost:3000/
Hash: b2aedb93a03c88a73cf9
Version: webpack 1.13.1
Time: 593ms
Asset Size Chunks Chunk Names
bundle.js 275 kB 0 [emitted] main
@tobiasmuehl
tobiasmuehl / kadira learngraphql defening queries refactor.js
Created April 26, 2016 12:03
Use new Arrow function syntax instead.
const Post = new GraphQLObjectType({
name: "Post",
description: "This represent a Post",
fields: () => ({
_id: {type: new GraphQLNonNull(GraphQLString)},
title: {
type: new GraphQLNonNull(GraphQLString),
resolve: post => (post.title || "Does not exist")
},
content: {type: GraphQLString}