Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#details: this file is intended to be called from inside generate_csv.sh
#usage: ./file_info.sh <Path to root> <Path to file> <blank lines int> <comment lines int> <code lines int>
#example "<ABSOLUTE_PATH>/../../"
OFFSET=$1 # how to get to the directory to search
#example:'Source/Engine/main.cpp'
SOURCEFILE=${2//###/ }
#include <iostream>
#include <ostream>
#include <string>
#include <vector>
class Matrix
{
// Helper struct for comma initializer list insertion
struct Matrix_CommaInitializer
#include <iostream>
#include <string>
#include <vector>
#define FIXED_POINT_OFFSET 11
// SLOW
#define FLOAT_TO_FIXED(x) (static_cast<int>(x * INT_TO_FIXED(1)))
#define FLOAT_FROM_FIXED(x) (static_cast<double>(x) / INT_TO_FIXED(1))
// http://coliru.stacked-crooked.com/a/68d80806be077278
#include <iostream>
#include <string>
#include <cstdlib> //rand
#include <vector>
#include <algorithm>
#include <cassert>
template<typename T>
@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
#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);
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
@JohannesMP
JohannesMP / css-references.md
Last active July 30, 2017 00:14
Web Dev References
@JohannesMP
JohannesMP / Windows10RegistryHacks.md
Last active August 24, 2025 11:55
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 / 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