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 / 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 / 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)!

#ifndef CORE_SCREENSHOT_H_
#define CORE_SCREENSHOT_H_
//------------------------------------------------------------------------------
class Screenshot
{
public:
int id; // thread ID (only used for loggin and debugging)
bool stopflag; // used to "tell" the thread to stop and clean up
std::string file;
SDL_Surface *surface;
@cedriczirtacic
cedriczirtacic / ddclient.service
Last active November 17, 2024 11:10
Systemd ddclient.service
#/usr/lib/systemd/system/ddclient.service
[Unit]
Description=ddclient Service
After=network.target
[Service]
Type=forking
PIDFile=/var/run/ddclient.pid
ExecStart=/sbin/ddclient -pid /var/run/ddclient.pid -file /etc/ddclient/ddclient.conf -daemon 300
ExecStop=/usr/bin/pkill -SIGKILL -P /var/run/ddclient.pid
@Brainiarc7
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Last active July 17, 2026 11:54
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

@htp
htp / curl-websocket.sh
Last active March 25, 2026 18:35
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active June 30, 2026 16:48
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@subfuzion
subfuzion / curl.md
Last active July 8, 2026 20:07
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@wislon
wislon / xaml-xcc-info.md
Last active November 18, 2020 13:18
Xam.Forms XAML conditional compilation& design-time bindings intellisense in VS

Xam.Forms XAML conditional compilation& design-time bindings intellisense

Original article:

http://adventuresinxamarinforms.com/2015/03/17/xaml-v-code/

add (to each xaml file, near the top with the other xmlns definitions)

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"