Skip to content

Instantly share code, notes, and snippets.

View byronmejia's full-sized avatar
🛒
🖨🖨🖨🖨🖨

Byron Mejia byronmejia

🛒
🖨🖨🖨🖨🖨
View GitHub Profile
@byronmejia
byronmejia / machine.js
Created April 28, 2020 06:35
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@byronmejia
byronmejia / rebaseMove.sh
Created October 10, 2018 04:05
Move Group of Commits
# Information To Come
@byronmejia
byronmejia / undo.sh
Last active October 8, 2018 07:10
Undo Last Commit
# Reset Head back one commit
git reset HEAD~
# Make Changes as required, then:
git commit -m "A Helpful Commit Message"
# Forceful Push (required if a remote branch has diverged)
git push -f
fix_screen() {
xrandr --output DisplayPort-0 --auto --output HDMI-A-0 --auto --panning 2880x1620+3840+0 --scale 1.5x1.5 --right-of DisplayPort-0
}
headphone_reboot() {
sudo rmmod btusb && sudo modprobe btusb
}
make_gif() {
FILE="$1"
@byronmejia
byronmejia / QUT Horizon Guide.md
Last active October 19, 2022 06:48
A QUT Student's guide to the Horizon (client).

VMware Horizon Client Tutorial

Sometimes, it's necessary to try and connect to the QUT computers as a student, whether it be for using certain proprietary software, certain environments, or beefier computers?

This guide assumes you are not on campus and require a VPN client (Virtual Private Network) to behave as if you are at QUT.

@byronmejia
byronmejia / vec_csv.rs
Created January 2, 2017 08:37
Vector of ints to string separated by commas
pub fn vec_u64(original: &Vec<u64>) -> String {
let mut list = original.clone();
let next = list.pop();
match next {
Some(next) => {
vec_u64_next(list, format!("{next}", next=next))
},
_ => {
"".to_string()
// Helper Function to generate 768 points, as supplied by frandss
function testData(){
var output = [];
for (var x = 0; x < 768; x ++) output.push(x);
return output
}
function fourtyEightChurner(array, length, current) {
if(current > (length - 48)) return 0;
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
typedef struct Thors {
int x;
int y;
} Thor;
int move(int x, int y, Thor *thor);
# Migration (This sits in db/migration folder) -------------------------
Sequel.migration do
up do
# Create Users table
create_table(:logins) do
primary_key :id
String :user_name, unique: true, null: false
String :password_hash, null: false
end
end
source 'https://rubygems.org'
#ruby=ruby-2.3.1 <----- This tells RVM to do 'rvm use ruby-2.3.1'
#ruby-gemset=myapp <--- This tells RVM to use the 'myapp' gem environment (rvm gemset use myapp)
ruby '2.3.1'
## Rest of your dependencies here after.....