Skip to content

Instantly share code, notes, and snippets.

View ProfessorSalty's full-sized avatar

Greg Smith ProfessorSalty

View GitHub Profile
<div class="alert_outer-container">
<div class="alert_text-container">
<span class="alert_text alert_text_delay">WELCOME!</span>
<video id="main-image" class="alert_image" title="Alert video" autoplay=""><source src="https://static-cdn.jtvnw.net/alert-asset/v2/250829309/video/2Z63dCU1zysZazaNnWxjW294HKu/04Alert_follower-3.webm" type="video/webm"></video>
</div>
</div>
// left & right, only rotate the body
var horizontalInput = Input.GetAxisRaw("Horizontal"); // -1 ... 1
transform.rotation = Quaternion.Euler(new Vector2(0, horizontalInput * sensitivity));
// up & down, only rotate the camera
var verticalInput = Input.GetAxisRaw("Vertical");
var constrainedInput = Mathf.Clamp(verticalInput * sensitivity, -maxRotation, maxRotation);
// get the camera and apply rotation
Camera.main.transform.rotation = Quaternion.Euler(new Vector2(constrainedInput, 0));
public static BehaviorTreeNode CreateBehaviorTreeNode(
SerializableBehaviorTreeNode serializableBehaviorTreeNode, Blackboard blackboard)
{
var targetType = Type.GetType(serializableBehaviorTreeNode.assemblyQualifiedTypeName);
if (targetType == null) return null;
var constructor =
targetType.GetConstructor(BindingFlags.Public | BindingFlags.Instance, null,
BehaviorTreeNodeConstructorProperties, null);
2022/01/01 15:11:19 [INFO] Packer version: 1.7.8 [go1.17.2 linux amd64]
2022/01/01 15:11:19 [TRACE] discovering plugins in /usr/bin
2022/01/01 15:11:20 [TRACE] discovering plugins in /home/gregorysmith/.config/packer/plugins
2022/01/01 15:11:20 [TRACE] discovering plugins in .
2022/01/01 15:11:20 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2022/01/01 15:11:20 [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/gregorysmith/.packerconfig
2022/01/01 15:11:20 [WARN] Config file doesn't exist: /home/gregorysmith/.packerconfig
2022/01/01 15:11:20 [INFO] Setting cache directory: /home/gregorysmith/.cache/packer
2022/01/01 15:11:20 [TRACE] listing potential installations for "github.com/hashicorp/proxmox" that match ">= 1.0.1". plugingetter.ListInstallationsOptions{FromFolders:[]string{"/usr/bin/packer", ".", "/home/gregorysmith/.config/packer/plugins"}, BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"l
@ProfessorSalty
ProfessorSalty / find_odd_integer.rb
Created September 9, 2016 15:43
Find the integer with an odd number of occurrences
array = [1,1,1,1,1,1,10,1,1,1,1,12,12,12]
def find_odd_integer(seq)
tmpDict = Hash.new 0
seq.each do |item|
tmpDict[item] += 1
end
tmpDict.select { |key, value| value % 2 ==1 }.keys
end