Skip to content

Instantly share code, notes, and snippets.

View angularsen's full-sized avatar

Andreas Gullberg Larsen angularsen

View GitHub Profile
@angularsen
angularsen / dev_tips.md
Last active April 10, 2019 07:32
A neverending gist about developer tips, because blogs are lame

Browsers

Network: Show only page navigations including redirects

Using the Doc filter in Chrome seems to merge entries during redirects, losing info. Instead, use the Filter input.

  • Chrome: mime-type: text/html
  • FireFox: cause: document
@karljj1
karljj1 / Unity Assembly Definition Debugger.cs
Last active March 27, 2024 17:18
Find out what assemblies are being built and how long each takes.
using System;
using System.Collections.Generic;
using System.Text;
using UnityEditor;
using UnityEditor.Compilation;
using UnityEngine;
[InitializeOnLoad]
public class AsmdefDebug
{
@neozero
neozero / main.cpp
Last active June 26, 2024 10:53
OculusHomeless - Use Oculus Dash without Home 2.0
/************************************************************************************
Content : First-person view test application for Oculus Rift
Created : 19th June 2015
Authors : Tom Heath
Copyright : Copyright 2015 Oculus, Inc. All Rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@negz
negz / kubedump.sh
Last active July 11, 2024 10:57
Dump Kubernetes cluster resources as YAML
#!/usr/bin/env bash
set -e
CONTEXT="$1"
if [[ -z ${CONTEXT} ]]; then
echo "Usage: $0 KUBE-CONTEXT"
exit 1
fi
using UnityEngine;
using System;
using System.Collections;
using VRTK;
public class IK : MonoBehaviour
{
Animator avatar; // アバター
public Transform lookAt = null; // 見る対象
@DarrenN
DarrenN / get-npm-package-version
Last active October 25, 2024 17:37 — forked from yvele/get-npm-package-version.sh
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION
@martinjw
martinjw / SqlExceptionMocker.cs
Last active October 16, 2022 21:02 — forked from timabell/SqlExceptionMocker.cs
Create a SqlException for testing
using System.Data.SqlClient;
using System.Reflection;
namespace HorribleThingsInHere
{
/// <summary>
/// Workaround completely test-unfriendly sql error classes.
/// Copy-paste from http://stackoverflow.com/a/1387030/10245
/// Adjusted with updates in comments
/// Adjusted to not use ctor indexes