Skip to content

Instantly share code, notes, and snippets.


Dmitry Manannikov slonoed

View GitHub Profile
neogeek / OculusSDKAutomation.cs
Last active Sep 14, 2022
Oculus SDK Unity Setup
View OculusSDKAutomation.cs
using UnityEditor;
using UnityEngine;
public static class OculusSDKAutomation
private static readonly GameObject playerControllerPrefab = AssetDatabase.LoadAssetAtPath<GameObject>("Assets/Oculus/VR/Prefabs/OVRPlayerController.prefab");
private static readonly GameObject controllerPrefab = AssetDatabase.LoadAssetAtPath<GameObject>("Assets/Oculus/VR/Prefabs/OVRControllerPrefab.prefab");
pirate /
Last active Sep 17, 2022
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
JohannesDeml / EditPrefabInScene.cs
Last active Aug 27, 2022 — forked from ulrikdamm/EditPrefab.cs
Unity editor script for better editing of prefabs. Put in Assets/Editor.
View EditPrefabInScene.cs
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine.SceneManagement;
// From
// Original
// Adds a "Edit Prefab" option in the Assets menu (or right clicking an asset in the project browser).
// This opens an empty scene with your prefab where you can edit it.
// Put this script in your project as Assets/Editor/EditPrefab.cs
swannodette /
Last active Nov 28, 2019
Externs Inference

Externs Inference

Integrating third party JavaScript libraries not written with Google Closure Compiler in mind continues to both be a source of error for users when going to production, and significant vigilance and effort for the the broader community (CLJSJS libraries must provide up-to-date and accurate externs).

In truth writing externs is far simpler than most users imagine. You only need externs for the parts of the library you actually intend to use from ClojureScript. However this isn't so easy to determine from Closure's own documentation. Still in the process of writing your code it's easy to miss a case. In production you will see the much dreaded error that some mangled name does not exist. Fortunately it's possible to enable some compiler flags :pretty-print true :pseudo-names true to generate an advanced build with human readable names. However debugging missing externs means compiling your production build for each missed case. So much time wasted for such simple mistakes damages our sen

gcanti /
Created Nov 5, 2016
Type safe event emitter with Flow
// A is a phantom type that ties an event instance...
class Event<A> {}
// its handler
type Handler<A> = (a: A, Array<void>) => void;

declare class EventEmitter {
  on<A, F: Handler<A>>(event: Event<A>, handler: F): void;
  emit<A>(event: Event<A>, a: A): void;
mthadley / .projections.json
Last active Aug 6, 2022
A configuration for using vim-projectionist with jest. I was looking for this but couldn't find it anywhere.
View .projections.json
"**/__tests__/*.js": {
"alternate": "{}.js",
"type": "test"
"*.js": {
"alternate": "{dirname}/__tests__/{basename}.js",
"type": "source"
0XDE57 /
Last active Sep 15, 2022
Firefox about:config privacy settings


about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable.

I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

anonymous /
Created Jun 26, 2015
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

> That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

bradp /
Last active Sep 22, 2022
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo " \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
ianbattersby / gist:4641450
Created Jan 26, 2013
Ubuntu TeamCity agent setup
View gist:4641450
# We need the following to get and run teamcity agent
sudo apt-get install openjdk-7-jre-headless
sudo apt-get install unzip #For unzipping
# For compiling Simple.Web
sudo apt-get install ruby1.9.1