Skip to content

Instantly share code, notes, and snippets.

View mbarq's full-sized avatar

Michael Barquero mbarq

View GitHub Profile
@mbarq
mbarq / bdn9.c
Created March 23, 2020 07:18
bdn9 rotary triple key combo
#include QMK_KEYBOARD_H
enum custom_keycodes {
ADD_VAL = SAFE_RANGE
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case ADD_VAL:
if (record->event.pressed) {
@mbarq
mbarq / gitBranch
Created May 1, 2017 05:17
gitTutorial6
Bulbasaur:desktop mbarq$ git branch prevolutions
Bulbasaur:desktop mbarq$ git branch
* master
prevolutions
Bulbasaur:desktop mbarq$ git checkout prevolutions
Switched to branch 'prevolutions'
Bulbasaur:desktop mbarq$ git branch
master
* prevolutions
@mbarq
mbarq / gitRemote
Created May 1, 2017 04:56
gitTutorial5
Bulbasaur:desktop mbarq$ git remote add origin https://github.com/mbarq/waterPokemon.git
Bulbasaur:desktop mbarq$ git push -u origin master
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 571 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/mbarq/waterPokemon.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
@mbarq
mbarq / gitCommit
Created May 1, 2017 04:47
gitTutorial4
Bulbasaur:desktop mbarq$ git commit -m "These are some cool water pokemon"
[master (root-commit) b05cb8b] These are some cool water pokemon
1 file changed, 22 insertions(+)
create mode 100644 waterPokemon.rtf
@mbarq
mbarq / gitAddStatus
Last active May 1, 2017 04:41
GitTutorial3
Bulbasaur:desktop mbarq$ git add waterPokemon.rtf
Bulbasaur:desktop mbarq$ git status
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: waterPokemon.rtf
@mbarq
mbarq / gitInit
Created May 1, 2017 04:29
GitTutorial2
Bulbasaur:desktop mbarq$ git init
Initialized empty Git repository in /Users/mbarq/Desktop/.git/
@mbarq
mbarq / listFiles
Created May 1, 2017 04:27
GitTutorial1
Bulbasaur:desktop mbarq$ ls
Bulbasaur untitled folder waterPokemon.rtf
@mbarq
mbarq / AmoebasInLove.java
Created March 1, 2017 14:06
Amoeba Colony!!
package amoebasinlove;
import javax.swing.JOptionPane;
public class AmoebasInLove {
public static void main(String[] args) {
int reply = JOptionPane.showConfirmDialog(null,
"Would you like to make an Amoeba Colony?",
@mbarq
mbarq / GloriousLotteryMachine.java
Last active March 13, 2017 22:56
Lottery Number Picker!
import java.util.Random;
import javax.swing.JOptionPane;
public class GloriousLotteryMachine {
public static void main(String[] args) {
String game = JOptionPane.showInputDialog(
"Welcome to the Glorious Lottery Machine!"
+ " To play, please type either:"
@mbarq
mbarq / Fizz_Buzz.rb
Last active February 5, 2017 17:17
Fizz Buzz!
class FizzBuzz
for x in 1..75
if x % 5 == 0 && x % 3 == 0
puts "FizzBuzz"
elsif x % 5 == 0
puts "Buzz"
elsif x % 3 == 0
puts "Fizz"
else
puts x