Skip to content

Instantly share code, notes, and snippets.

View Dids's full-sized avatar
🏠
Working from home

Pauli Jokela Dids

🏠
Working from home
View GitHub Profile
@Dids
Dids / Dockerfile
Created December 16, 2015 15:24
Hosting Datadog docker image on Tutum with Haproxy and Nginx support
FROM tutum/datadog-agent
ADD nginx.yaml /etc/dd-agent/conf.d/nginx.yaml
ADD haproxy.yaml /etc/dd-agent/conf.d/haproxy.yaml
@Dids
Dids / GUIDE.md
Last active April 16, 2023 12:28
Conan Exiles dedicated server configuration

For a simple, default server setup, open ports 7777/UDP, and 27015/UDP in your firewall.

  • Port=7777 (game data)
  • QueryPort=27015 (Steam queries)

Be sure to run the server (StartServer.bat) once, so it can generate the initial config files!


It is best to combine this configuration with the batch file setup here (so add the ConanSandboxServer.exe params to a new start.bat file instead)!

@Dids
Dids / C:\steamcmd\install.bat
Last active March 16, 2019 20:42
Conan Exiles dedicated server startup scripts (be sure to checkout the server configuration guide here: https://gist.github.com/Dids/9564a693bb5b40cc0773cf8a5f07b4c1)
@echo off
steamcmd.exe +runscript install.txt
@Dids
Dids / 0_reuse_code.js
Created April 18, 2017 18:48
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Dids
Dids / clover_info_plist_patching.md
Last active December 7, 2017 12:29
Clover Info.plist patching

Introduction

In this example, we'll be patching /Library/Extensions/NVDAStartupWeb.kext/Contents/Info.plist, replacing any occurrences of <string>17B1003</string> with <string>17C88</string>, allowing us to enable the Nvidia Web Driver on "unsupported" versions of macOS, such as newly released updates, without having to wait for an updated driver to become available.

It's very important to note that there are actually two spaces in the replacement value (Markdown doesn't display them correctly), as the character lengths of both values must always match. In this case it made more sense to add the spaces before rather than after, as they're most likely to already exist in the original Info.plist.

Encoding

This shows how you can encode both values to a base64 encoded string, which is the format that'll end up in the patch itself.

@Dids
Dids / .hyper.js
Last active December 11, 2017 07:52
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
//updateChannel: 'stable',
updateChannel: 'canary',
@Dids
Dids / IPA_Install_Apple_Silicon.md
Last active March 25, 2024 20:39
Installing IPAs on the M1

Installing IPAs on Apple Silicon (M1)

  1. Open Apple Configurator 2 and plug in your iPhone or iPad
  2. Click Add, login to the App Store and select the application you want to install
  3. Open up ~/Library/Group\ Containers/K36BKF7T3D.group.com.apple.configurator/Library/Caches/Assets and wait until the TemporaryItems directory appears
  4. Copy the application from the newly created temporary directory, but do note that it will disappear once Apple Configurator is done installing
  5. Double click the .ipa on your Apple Silicon (M1) device and install it
  6. Fix permissions on the installed application by running sudo xattr -rd com.apple.quarantine /Applications/<your_app>.app (if you skip this step, you're unable to start the application)

Note that it's easier if you already have the application installed, as Apple Configurator will prompt you about overwriting the existing installation, at which point the temporary file (the .ipa) will still exist, until you choose an action in the prompt.

@Dids
Dids / Compile_Go_for_Apple_Silicon_M1.md
Last active September 25, 2023 01:55
Compile Go for Apple Silicon (M1)

NOTICE: This guide is no longer relevant, as a lot has changed over time and Go supports Apple Silicon natively just fine now!

Compile Go for Apple Silicon (M1)

Follow these short instructions on how to compile Go for Apple Silicon (M1). From here on out, we may simply refer to it as the "ARM device".

This entire process should only take about 5-10 minutes, but please read through everything carefully, in order to avoid any potential issues along the way.

Note that at the time of writing this, Go was not yet officially available for Apple's ARM.

@Dids
Dids / raw_img_gpt_efi.md
Last active January 11, 2024 12:25
Working with raw disk images with GPT + EFI partition in linux

What is the purpose of this guide?

I originally wanted to create bootable disks for UEFI (i)PXE booting, meaning I could directly boot premade disk images over the network, no matter what they may contain.

While this guide serves my purpose well, it's also generic enough to be extended to almost any use case. For example, you might use it as temporary or even portable storage, mountable across different operating systems, or you might use it as a disk image for a virtual machine.

DISCLAIMER: Be very careful with the commands listed below, as you could potentially not only cause data loss, but even prevent your operating system from booting, no matter how unlikely either of those may be. Pay attention to the commands, comments and differences between the guide and your local environment.


@Dids
Dids / NUT_ESXi_7.md
Last active November 27, 2022 16:12
Installing NUT for ESXi 7.x
  1. Set ESXi package acceptance level to community:
esxcli software acceptance set --level=CommunitySupported
  1. Install the VIB:
cd /tmp
wget https://blog.rylander.io/2017/01/15/connect-a-esxi-6.5-host-to-a-ups-connected-to-a-synology-nas/NutClient-ESXi500-1.4.0.tar.gz
tar -xvzf NutClient-ESXi500-1.4.0.tar.gz