Skip to content

Instantly share code, notes, and snippets.

View joelgallant's full-sized avatar
🚗

Joel Gallant joelgallant

🚗
View GitHub Profile
// GeneratedClient here is codegen-ed
#[tonic::async_trait]
impl TonicClient for GeneratedClient<Channel> {
async fn try_connect(
dest: tonic::transport::Endpoint,
) -> Result<Self, tonic::transport::Error> {
GeneratedClient::connect(dest).await
}
}
/*
* HID RFID Reader Wiegand Interface for Arduino Uno
* Originally by Daniel Smith, 2012.01.30 -- http://www.pagemac.com/projects/rfid/arduino_wiegand
*
* Updated 2016-11-23 by Jon "ShakataGaNai" Davis.
* See https://obviate.io/?p=7470 for more details & instructions
*/
#define MAX_BITS 100 // max number of bits
template <typename T>
class Optional final {
struct NullOption {
explicit constexpr NullOption(int) {} // NOLINT
};
public:
Optional() : has_val(false), val() { }
Optional(NullOption) : has_val(false), val() { } // NOLINT
Optional(T val) : has_val(true), val(val) { } // NOLINT

Team Lead Responsibilities

Find list here.

Strategy

  • Includes all members of the team as valuable parts of strategic decisions
  • Ensures strategic decisions are made in timely fashion, by the deadlines set in schedules
  • Leads strategy discussions
  • Leads pick-list discussions
@joelgallant
joelgallant / Gordian Tests
Last active December 22, 2015 18:59
Tests to ensure gordian is functioning correctly after a patch. Does not do absolutely everything, but it is sufficient for a release.
print('Should print 1')
print(x = 1)
print('Should print 2')
print(2)
print('Should print 3')
print(3.0)
print('Should print 1.000000000001')
@joelgallant
joelgallant / ConsoleGordian.java
Created July 31, 2013 03:36
A gordian console runtime that interprets instructions as you type them
import edu.gordian.elements.methods.UserMethod;
import edu.gordian.scopes.Scope;
import edu.gordian.values.UserReturningMethod;
import edu.gordian.values.Value;
import java.util.Scanner;
import java.util.StringTokenizer;
public class ConsoleGordian {
public static void main(String[] args) throws Exception {
@joelgallant
joelgallant / gordian recursion
Last active December 19, 2015 09:59
Gordian concatenation recursion. I am so excited to see this working!
def concat(x, i)
def _concat(j, w, e)
if(e > 0)
return _concat(j + w, w, e - 1)
else
return j
end
end
@joelgallant
joelgallant / AlbumFinder.java
Last active December 19, 2015 03:09
Using [Java Music Tag](http://javamusictag.sourceforge.net/), finds albums from MusicBrainz based on title and artist. Isn't fantastic at doing things automatically (musicbrainz search is really bad at sorting). Look at source code to understand how to use.
package test;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.Arrays;
import java.util.Iterator;
@joelgallant
joelgallant / Checks.txt
Last active December 18, 2015 01:19
Checks for ATALibJ Classes
Security:
_ Internally used objects are private
_ All fields that can be final are final
_ All methods that are depended on in other methods should be final
_ Classes that are not final should not use its non-final methods inside of any of its own methods
_ Classes that should not be extended should be final
_ Internal classes should be static whenever possible
_ Enums should have private constructors
_ Minimize accessibility
_ Minimize mutability
@joelgallant
joelgallant / gordianEx.txt
Last active December 17, 2015 18:29
Gordian 3.0 hypothetical example
// Run segments using @Name
@Autonomous {
method()
if(true)
method()
else
method()
method()
method()