Skip to content

Instantly share code, notes, and snippets.

y=ax2+bx+c


H20

@JohannesMP
JohannesMP / serve-4444.bat
Created November 28, 2017 23:24
Using a batch file's name to pass in an argument
@echo off
setlocal
setlocal EnableDelayedExpansion
SET filename=%~n0
SET delim=-
SET port=!filename:*%delim%=!
echo PORT: %port%
rem example: running jekyll with a given port
rem start "JEKYLL" bundle exec jekyll serve --port=%port%
/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <stdio.h>
int main()
@JohannesMP
JohannesMP / ConvertBase.hpp
Last active September 14, 2022 02:14
Converting a number from one base to another in C++
// NOTE: For the sake of practice, STL/stdlib helpers are not used, just std::string for memory management.
#include <string>
using std::string;
// Convert arbitrary base to base 10
// - Input must be valid number in the given base
// - Base must be between 2 and 36
// - If input or base are invalid, returns 0
long ConvertTo10(const string& input, int base)
@JohannesMP
JohannesMP / FrozenSynapseControls.txt
Created August 29, 2017 10:45
Keyboard Shortcuts and Commands for Frozen Synapse
Camera
- Cursor keys or right click: pan
- M+K: Zoom
Waypoints
- Double click: place Waypoint
- Shift click: override default pathing
- Backkspace: remove waypoints in order
- = (equals sign): delete last 10 commands
@JohannesMP
JohannesMP / Windows10RegistryHacks.md
Last active September 13, 2022 03:40
A small collection of Registry hacks for Windows 10 installations

Note: for any folder not found, navigate as far as possible, then create as a new Key

Disable Downloads like Candy Crush, etc.

  • HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent
  • Dword DisableWindowsConsumerFeatures set to 1

Disable Lock screen, just show login form

@JohannesMP
JohannesMP / css-references.md
Last active July 30, 2017 00:14
Web Dev References
SERVER:
TEST:2 (8 threads), RUNS:10,000
$ time ./run_multiple.sh gcc0-skeleton.exe 2 10000 1000
Testing executable gcc0-skeleton.exe:
- Running Test #2
- Iterations: 10000
- Printing every 1000th iteration
iteration: 1000
#if UNITY_EDITOR
[CanEditMultipleObjects]
[CustomEditor(typeof(BaseClass), true)]
public class BaseClassEditor : Editor
{
public override void OnInspectorGUI()
{
var t_baseTarget = typeof(BaseClass);
var t_baseEditor = typeof(BaseClassEditor);
@JohannesMP
JohannesMP / .gitignore
Created November 24, 2016 23:50
git ignore file for nodejs
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock