Skip to content

Instantly share code, notes, and snippets.

@GavinRay97
GavinRay97 / flags.txt
Last active December 1, 2023 22:06
Good Clang C++ Flags
# Created with: $ diagtool tree
-Wall
-Wextra
-Wpedantic
-Warray-bounds-pointer-arithmetic
-Wbind-to-temporary-copy
-Wcalled-once-parameter
-Wcast-align
@raizr
raizr / orthodoxc++.md
Created June 4, 2022 23:03 — forked from bkaradzic/orthodoxc++.md
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@wlib
wlib / LICENSE
Last active April 30, 2024 17:07
Run a shell script with bash, line-by-line, prompted on each command. Useful for running unknown scripts or debugging. Not a secure substitute for understanding a script beforehand.
MIT License
Copyright (c) 2021 Daniel Ethridge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
//
// Author: Jonathan Blow
// Version: 1
// Date: 31 August, 2018
//
// This code is released under the MIT license, which you can find at
//
// https://opensource.org/licenses/MIT
//
//
@fay59
fay59 / Quirks of C.md
Last active January 23, 2024 04:24
Quirks of C

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
 int x;
@CoffeePirate
CoffeePirate / se_server_linux.md
Last active March 24, 2024 22:03
A quick guide how to setup Space Engineers Dedicated server on a Linux box with Wine

Ubuntu 14.04/14.10 SpaceEngineers Dedicated Server

Here's a quick guide how to run SpaceEngineers Dedicated Server on Ubuntu with Wine

Requirements

  • A copy of Space Engineers
  • A Windows box
  • A Linux box running Ubuntu 14.04 or 14.10 (It'll probably work on other distros, YMMV)

Step #1: Install & configure Wine1.6 and dependencies

@mwf
mwf / Installation-tutorial-for-Git-Server-on-OS-X.md
Last active June 15, 2021 08:10
Mac OS X 10.9 - Create system user and allow ssh login

A small tutorial for how to set up Git Server on Mac OS X. The main dificulty was to create a "system" user (aka "daemon", uid<=500) and allow ssh login for it.

  1. I need 'git'-user to be system - not visible in standart users list.
  2. I need to allow ssh access only for some users/groups.

The tutorial for Git server setting up - http://git-scm.com/book/ca/Git-on-the-Server-Setting-Up-the-Server

So I need to create system user 'git' with homefolder.

System user creation script - http://serverfault.com/a/532860. I've modified it a little and uploaded here https://gist.github.com/mwf/20cbb260ad2490d7faaa#file-create_sys_user-sh.

@UniIsland
UniIsland / README.md
Last active September 22, 2021 09:28
Mnemonic Wordlist

This word list is recommended by MNX.io in the article A Proper Server Naming Scheme.

Usage

Choose a word at will from the word list below.

The easiest way to randomly get a word from the wordlist on Linux is:

shuf -n 1 $FILENAME

API documentation for localhost:2337

authentication.password.authenticate

Parameters

  • password - string (required)
  • userid - string (required)
@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 13, 2024 11:18
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j