Skip to content

Instantly share code, notes, and snippets.

View lorenalexm's full-sized avatar

Alex Loren lorenalexm

View GitHub Profile
@lorenalexm
lorenalexm / mystery-organism.js
Last active September 4, 2021 14:29
My solution to the Codecademy Challenge Project: Mysterious Organism.
// Returns a random DNA base
const returnRandBase = () => {
const dnaBases = ['A', 'T', 'C', 'G'];
return dnaBases[Math.floor(Math.random() * 4)];
};
// Returns a random single stand of DNA containing 15 bases
const mockUpStrand = () => {
const newStrand = [];
for (let i = 0; i < 15; i++) {
@lorenalexm
lorenalexm / Events.swift
Last active March 22, 2021 20:18
The work on porting the UnityMessenger (https://github.com/lorenalexm/UnityMessenger) from C# to Swift using Silver.
// MARK: Placeholder, replace with real types
public enum EventType {
case notSet
}
// MARK: Delegate type aliases
public typealias Callback = () -> ()
public typealias Callback<T> = (arg: T) -> ()
// MARK: Event exceptions
#!/bin/bash
for i in *.avi;
do
name=`echo $i | cut -d'.' -f1`;
avconv -i "$i" -vcodec libx264 -acodec aac -strict experimental -threads 3 "$name.mp4";
done