Skip to content

Instantly share code, notes, and snippets.

@glinesbdev
glinesbdev / rubymine-reset-eval.sh
Created Jan 7, 2020 — forked from vtambourine/rubymine-reset-eval.sh
Reset RubyMine (and other JetBrains products) evaluation period.
View rubymine-reset-eval.sh
#!/usr/bin/env bash
# $ crontab -e
# 0 0 25 * * * ~/rubymine-reset-eval.sh
rm -fr $HOME/Library/Preferences/RubyMine*/eval
rm $HOME/Library/Preferences/jetbrains.rubymine.*.plist
echo "RubyMine evaluation period has been reset. Please, buy it if you like it!"
View gitlab-search-shortcut.js
// ==UserScript==
// @name Gitlab search shortcut
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Gives a keyboard shortcut to the search field in Gitlab
// @author Bradyn Glines
// @include /^https:\/\/gitlab\.*/*/
// @grant none
// ==/UserScript==
@glinesbdev
glinesbdev / main.asm
Last active Sep 20, 2019
Gameboy Hello World
View main.asm
INCLUDE "hardware.inc"
; Beginning of the rom
SECTION "Header", ROM0[$100]
di ; Disable interrupts since we don't want to be interrupted
jp Start ; Jump to the Start label
nop ; No nothing for 1 cycle (approx: 1MgHz)
ds $150 - $104 ; Write nothing for $150 to $104 which is the rom header information
View keybase.md

Keybase proof

I hereby claim:

  • I am glinesbdev on github.
  • I am glinesbdev (https://keybase.io/glinesbdev) on keybase.
  • I have a public key ASBRMmmp2RsEJRGIGVCeIKU77U0iUem-U2Wl-blyTxikCwo

To claim this, I am signing this object:

@glinesbdev
glinesbdev / main.rs
Last active Aug 26, 2019
Basic Pig Latin Translator - Rust
View main.rs
use std::{
fs::File,
io::{prelude::*, BufReader},
};
mod pig_latin;
fn main() {
let file = File::open("text.txt").expect("Can't open file.");
let file_size = file.metadata().unwrap().len();
@glinesbdev
glinesbdev / fib.asm
Created Aug 22, 2019
MacOS Assembly - Fibonacci
View fib.asm
global _main
extern _printf
section .text
_main:
push rbx ; We have to save this since we use it
mov ecx, 90 ; ecx will countdown to 0
xor rax, rax ; rax will hold the current number
xor rbx, rbx ; rbx will hold the next number
@glinesbdev
glinesbdev / triangle.asm
Created Aug 22, 2019
MacOS Assembly - Triangle
View triangle.asm
global start
section .text
start:
mov rdx, output ; rdx holds address of next byte to write
mov r8, 1 ; initial line length
mov r9, 0 ; number of stars written on line so far
line:
mov byte [rdx], '*' ; write single star
View example.dart
class PostPage extends StatelessWidget {
const PostPage({
Key key,
@required this.post,
}) : super(key: key);
final Post post;
@override
Widget build(BuildContext context) {
@glinesbdev
glinesbdev / Main.elm
Created May 7, 2019
Elm Msg Chain Madess
View Main.elm
SubmitMessage ->
( model
, getTime
)
GotTime time ->
( { model | timeSent = Time.posixToMillis time }
, generateRandomId
)
@glinesbdev
glinesbdev / Main.elm
Last active May 1, 2019
Cmd.batch Example
View Main.elm
type Msg
= UrlRequested Browser.UrlRequest
| UrlChanged Url.Url
| NameEntered String
| NameSubmitted
| MessageEntered String
| MessageSubmitted
| GenerateRandomId String
generateRandomChatId : Cmd Msg
You can’t perform that action at this time.