Skip to content

Instantly share code, notes, and snippets.

View tylorr's full-sized avatar

Tylor Reynolds tylorr

View GitHub Profile
@lurebat
lurebat / README.md
Last active April 15, 2024 11:35
Jetmove - A script to enhance navigation and multiple carets in Jetbrains IDEs

What is this?

Jetmove is a script I wrote to myself for some navigation and multiple carets features I felt were missing in Jetbrains IDEs.

It uses the excellent Live Plugin to run the script in the IDE.

All features support multiple carets, and are designed to work with them.

Features

@Jakob-PB
Jakob-PB / rider-csharp-filelayout.xml
Created May 7, 2020 07:47
A reasonable set of C# file layout rules for automatic rearranging of Unity code in Rider.
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
<TypePattern DisplayName="Non-reorderable types">
<TypePattern.Match>
<Or>
<And>
<Kind Is="Interface" />
<Or>
<HasAttribute Name="System.Runtime.InteropServices.InterfaceTypeAttribute" />
<HasAttribute Name="System.Runtime.InteropServices.ComImport" />
</Or>
@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
@DimitryDushkin
DimitryDushkin / configs.js
Created October 2, 2018 14:19
React Native 0.57 + Babel 7 + Typescript + Jest
// babel.config.js
module.exports = {
"presets": [
"module:metro-react-native-babel-preset",
],
"plugins": [
["module-resolver", {
"root": ["./src"],
"extensions": [".js", ".ts", ".tsx", ".ios.js", ".android.js"]
}],
#if UNITY_EDITOR || DEVELOPMENT_BUILD
#define PROFILING_ENABLED
#endif
#if NET_4_6 || NET_STANDARD_2_0 || NETFX_CORE
#define NET_MODERN
#endif
using System;
using System.Diagnostics;
@devmrin
devmrin / TouchableDebounce.js
Last active June 4, 2019 20:22
Touchable Debounce - Medium Article
import React, { PureComponent } from "react";
import { PropTypes, ViewPropTypes, TouchableOpacity } from "react-native";
import { debounce } from "underscore";
//PureComponent handles shouldComponentUpdate for you.
class TouchableDebounce extends React.PureComponent {
constructor(props) {
super(props);
}
@taka-oyama
taka-oyama / ExitPlayModeOnScriptCompile.cs
Created October 5, 2016 02:11
This script exits play mode whenever script compilation is detected during an editor update.
// Copyright Cape Guy Ltd. 2015. http://capeguy.co.uk.
// Provided under the terms of the MIT license -
// http://opensource.org/licenses/MIT. Cape Guy accepts
// no responsibility for any damages, financial or otherwise,
// incurred as a result of using this code.
using UnityEngine;
using UnityEditor;
/// <summary>
@knowbody
knowbody / RNfontWeights.js
Created July 14, 2016 13:42
React Native Font Weight Cheatsheet iOS
{ fontWeight: '100' }, // Thin
{ fontWeight: '200' }, // Ultra Light
{ fontWeight: '300' }, // Light
{ fontWeight: '400' }, // Regular
{ fontWeight: '500' }, // Medium
{ fontWeight: '600' }, // Semibold
{ fontWeight: '700' }, // Bold
{ fontWeight: '800' }, // Heavy
{ fontWeight: '900' }, // Black
@t0chas
t0chas / CustomEditorBase.cs
Last active March 5, 2024 16:47
Default Custom Inspector-Editor for Unity3D with ReorderableLists for arrays handling
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
using System.Collections.Generic;
using UnityEditor.AnimatedValues;
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)]
[CanEditMultipleObjects]
public class CustomEditorBase : Editor
{
@f1sherman
f1sherman / forwarding-example.md
Last active March 12, 2021 00:21
Port Forwarding Example in OS X El Capitan

Add the following to /etc/pf.anchors/myname:

rdr pass on lo0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 4000
rdr pass on lo0 inet proto tcp from any to any port 443 -> 127.0.0.1 port 4001

Add the following to /etc/pf-myname.conf:

rdr-anchor "forwarding"
load anchor "forwarding" from "/etc/pf.anchors/myname"