Skip to content

Instantly share code, notes, and snippets.

# Macro for Unity YAML-based asset files.
[attr]unityyaml -text merge=unityyamlmerge diff
# Macro for all binary files that should use Git LFS.
[attr]lfs -text filter=lfs diff=lfs merge=lfs
# Default to auto-normalized line endings.
* text=auto
# Code
@Genora51
Genora51 / CSharp-Standards.md
Last active August 3, 2020 09:30
Coding Standards for C#

Coding Guidelines for C#

Introduction

This document describes rules and recommendations for developing applications and class libraries using the C# Language. The goal is to define guidelines to enforce consistent style and formatting and help developers avoid common pitfalls and mistakes. Specifically, this document covers Naming Conventions, Coding Style, Language Usage, and Object Model Design. This document was adapted from the Lance Hunt .NET Coding Standards.

Scope

proc float randAbout(float $range, float $centre) {
// Generate random numbers within a range
return rand(-$range/2, $range/2) + $centre;
}
proc string pad4(int $i) {
// Pad an int with zeros up to length 4
return `python ("'%04d' % "+string($i))`;
}
@Genora51
Genora51 / inwce.ps1
Last active December 23, 2017 22:41
$InputString = 'TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAAA1BO7HcWWAlHFlgJRxZYCU4isYlHBlgJQeEyuUU2WAlB4THpR6ZYCUeB0TlHplgJRxZYGU7GWAlB4TKpThZYCUHhMalHBlgJQeEx2UcGWAlFJpY2hxZYCUAAAAAAAAAAAAAAAAAAAAAFBFAABkhgYAjJuBUgAAAAAAAAAA8AAiAAsCCgAA8gEAAIoBAAAAAACkIQEAABAAAAAAAEABAAAAABAAAAACAAAFAAIAAAAAAAUAAgAAAAAAANADAAAEAAAAAAAAAwBAgQAAEAAAAAAAABAAAAAAAAAAABAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAANhBAgB4AAAAABADAHCoAAAA8AIAWBEAAAAAAAAAAAAAAMADAMwBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAIA2AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC50ZXh0AAAAZPABAAAQAAAA8gEAAAQAAAAAAAAAAAAAAAAAACAAAGAucmRhdGEAAFpCAAAAEAIAAEQAAAD2AQAAAAAAAAAAAAAAAABAAABALmRhdGEAAAAIggAAAGACAABUAAAAOgIAAAAAAAAAAAAAAAAAQAAAwC5wZGF0YQAAWBEAAADwAgAAEgAAAI4CAAAAAAAAAAAAAAAAAEAAAEAucnNyYwAAAHCoAAAAEAMAAKoAAACgAgAAAAAAAAAAAAAAAABAAABALnJlbG9jAACwBAAAAMADAAAGAAAASgMAAAAAAAAAAAAAAAAAQAAAQgAAAAAAAAAAAAAAAAAAAAAAAAAA
@Genora51
Genora51 / robot2.c
Last active December 15, 2017 21:34
#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, I2C_1, armEncoder, sensorQuadEncoderOnI2CPort, , AutoAssign)
#pragma config(Motor, port1, rightFrontMotor, tmotorVex393_HBridge, openLoop)
#pragma config(Motor, port2, leftFrontMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port3, rightBackMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port4, rightArmMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port5, leftIntakeMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port6, rightIntakeMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port7, clawLiftMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port8, leftArmMotor, tmotorVex393_MC29, openLoop, encoderPort, I2C_1)
@Genora51
Genora51 / robot.c
Last active December 4, 2017 10:34
#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, I2C_1, armEncoder, sensorQuadEncoderOnI2CPort, , AutoAssign)
#pragma config(Motor, port1, rightFrontMotor, tmotorVex393_HBridge, openLoop)
#pragma config(Motor, port2, leftFrontMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port3, rightBackMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port4, rightArmMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port5, leftIntakeMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port6, rightIntakeMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port7, clawLiftMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port8, leftArmMotor, tmotorVex393_MC29, openLoop, encoderPort, I2C_1)
<?php
$sname = "localhost";
$usname = "root";
$pword = "";
$db = "day_ok";
$conn = new mysqli($sname,$usname,$pword,$db);
$dat = date('j');
$mon = date('n');
$sql = "SELECT name from `dates` where date=".$dat." AND month=".$mon.";";
$res = $conn->query($sql);