This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
[RequireComponent( typeof(Camera) )] | |
public class FlyCamera : MonoBehaviour { | |
public float acceleration = 50; // how fast you accelerate | |
public float accSprintMultiplier = 4; // how much faster you go when "sprinting" | |
public float lookSensitivity = 1; // mouse look sensitivity | |
public float dampingCoefficient = 5; // how quickly you break to a halt after you stop your input | |
public bool focusOnEnable = true; // whether or not to focus and lock cursor immediately on enable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Extra_ET_Builder_Module_Filterable_Portfolio extends ET_Builder_Module_Filterable_Portfolio { | |
function init() { | |
$this->name = esc_html__( 'Filterable Portfolio', 'et_builder' ); | |
$this->plural = esc_html__( 'Filterable Portfolios', 'et_builder' ); | |
$this->slug = 'et_pb_filterable_portfolio'; | |
$this->vb_support = 'off'; | |
$this->main_css_element = '%%order_class%%.et_pb_filterable_portfolio'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Removes et_add_viewport_meta from the wp_head phase | |
function remove_divi_actions() { | |
remove_action( 'wp_head', 'et_add_viewport_meta' ); | |
} | |
// Call 'remove_divi_actions' during WP initialization | |
add_action('init','remove_divi_actions'); | |
// add ability to pinch and zoom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The element you're targetting | |
// The class you're toggling | |
const el = document.querySelector('.menu-item-has-children'); | |
const handleToggle = () => el.classList.toggle('available'); | |
el.onclick = () => handleToggle(); | |
document.addEventListener('click', event => { | |
const isClickInside = el.contains(event.target) | |
if (!isClickInside) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
""" | |
USAGE: | |
morphagene_ableton.py -w <inputwavfile> -l <inputlabels> -o <outputfile>' | |
Instructions in Ableton: | |
Insert locators as splice markers in your project (Create > Add Locator) | |
Export Audio/Video with | |
Sample Rate: 48000 Hz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/questions/16432071/how-to-fix-homebrew-permissions | |
sudo chown -R "$USER":admin 'path-to-thing-brew-complains-about' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f = 2; // Freq | |
a = 10; // Amount | |
posterizeTime(f); // Posterise it | |
wiggle(f, a); // Wiggle that |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <octane-oslintrin.h> | |
// IMPORTANT: Make sure the input | |
// is using OSL delayed UV projection. | |
// | |
// This shader will convert a height map to a tangent normal map | |
// based on the average value, luminance or intensity of one of the RGB channels. | |
// | |
// If you need many of these nodes with Quality set to High, | |
// please consider using the baking texture node. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Futher info here: https://github.com/TablePlus/DBngin/issues/38 | |
mysql --socket /tmp/mysql_3306.sock -uroot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Customiser script */ | |
add_action( 'customize_register', 'custom_editor' ); | |
function custom_editor( $wp_customize ) { | |
// Analytics section | |
$wp_customize->add_section('analytics_section', array( | |
'title' => __( 'Analytics', 'tuesday' ), | |
'description' => __( 'Enable tracking and analytics by placing your script tags in the correct location. <small><strong>Note:</strong> All scripts must be self-containing <script></script>, otherwise they will just print the code onto the website.</small>', 'tuesday' ), |
NewerOlder