Skip to content

Instantly share code, notes, and snippets.

View twogood's full-sized avatar

David Eriksson twogood

View GitHub Profile
mael /
Last active November 2, 2023 02:35
Xcode 10.2 "Unable to boot the Simulator"

Solution "Unable to boot the Simulator"

sudo mkdir /private/tmp

sudo chmod 1777 /private/tmp

Other basic command


xcrun simctl list devices //to list all simulators

xcrun simctl delete // to delete specific device

Cheesetouched / .gitignore
Created March 3, 2019 04:18
Standardised gitignore for your Flutter apps & Dart projects
View .gitignore
### Flutter Generated
# Miscellaneous
bcnzer / cloudflareworker-verifyjwt.js
Last active October 6, 2023 02:11
Sample Cloudflare worker that gets the JWT, ensures it hasn't expired, decrypts it and returns a result
View cloudflareworker-verifyjwt.js
addEventListener('fetch', event => {
// Following code is a modified version of that found at
* Fetch and log a request
* @param {Request} request
mrothNET /
Last active October 27, 2023 00:36
Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

This tutorial describes how to install TLS to a mail server consisting of Postfix and/or Dovecot by using Let's Encrypt certificates with automatic renewing and firewall management.

The system used for this tutorial was:

$ lsb_release -idrc
Distributor ID: Ubuntu
tomaszpolanski / Movie.kt
Last active June 28, 2022 21:04
Parcelize testing
View Movie.kt
import android.annotation.SuppressLint
import android.os.Parcelable
@SuppressLint("ParcelCreator") // IntelliJ Issue
data class Movie(val title: String) : Parcelable
chenxiaolong /
Created November 27, 2017 01:33
Switching between AHCI and RAID on the Dell XPS 15 (9560)

Switching between AHCI and RAID on the Dell XPS 15 (9560)

This guide likely applies to other models and, potentially, even laptops from other OEMs that have NVME drives. However, I've only tested this on my Dell XPS 15 (9560) with the OEM Windows installation from the Signature Edition model.

Switching from RAID to AHCI

Switching from RAID to AHCI is significantly simpler than switching from AHCI to RAID. All that's needed is a successful boot to Safe Mode.

  1. To set the default boot mode to Safe Mode, use msconfig.exe or open an admin cmd/PowerShell window and run:
View InternalsVisibleTo.cs
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("StandardSample.Tests")]
ahmetb /
Last active October 31, 2023 12:21
Script to clean up Google Container Registry images pushed before a particular date
# Copyright © 2017 Google Inc.
# 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
# Unless required by applicable law or agreed to in writing, software
mosquito /
Last active November 23, 2023 11:28
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

Description=%i service with docker compose
JamesKyburz / node-inspect-docker
Last active July 29, 2018 13:54
debug server-base-docker processes with node --inspect-brk
View node-inspect-docker
#!/usr/bin/env bash
if [ "`uname`" == "Darwin" ] && ! [ -x "$(command -v chrome-cli)" ]; then
brew install chrome-cli
docker-compose kill $service
docker-compose rm -f $service