Skip to content

Instantly share code, notes, and snippets.

View Digi-Cazter's full-sized avatar

Donavan White Digi-Cazter

  • Technologist Group, LLC
  • Montana
View GitHub Profile
@Digi-Cazter
Digi-Cazter / main.zig
Last active March 13, 2024 01:12 — forked from mattfreire/main.zig
Advent of code day 5 - Fix for `attempt to use null value`
const std = @import("std");
const Stack = std.ArrayList(u8);
const Operation = struct { from: u8, to: u8, number: u8 };
pub fn create_stacks(allocator: std.mem.Allocator, stack_count: u8, it: *std.mem.SplitBackwardsIterator(u8, .any)) ![]Stack {
var stacks: []Stack = try allocator.alloc(Stack, stack_count);
for (stacks, 0..) |_, i| {
stacks[i] = Stack.init(allocator);
@Digi-Cazter
Digi-Cazter / king.txt
Created January 29, 2024 07:14
ASCII 3D Card
.:::::::::::::::::
| K ||
| __ __ ||
| / \/ \ ||
| \ / ||
| \ / ||
| \ / ||
| \/ ||
| K ||
|_______________|/
@Digi-Cazter
Digi-Cazter / branch_flow.md
Last active February 16, 2022 20:56
Git Command - Branch Flow
git checkout master
git pull origin master
git branch <feature_branch>
git checkout <feature_branch>

<Make Code Changes>  

git add .
git commit -m "Message for commit"

git push origin

@Digi-Cazter
Digi-Cazter / git_bash.sh
Last active October 11, 2021 20:12
Personlized .bashrc file
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo -e "\e[01;33m*\e[01;31m"
}
function parse_git_branch {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/(git::\1$(parse_git_dirty))/"
}
parse_svn_branch() {
parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk -F / '{print "(svn::"$1 "/" $2 ")"}'
@Digi-Cazter
Digi-Cazter / gist:3352312
Created August 14, 2012 20:02
Turn off tinyint boolean emulation in Rails 3.2
#
# config/application.rb
#
require 'active_record/connection_adapters/mysql2_adapter'
module App
class Application < Rails::Application
ActiveRecord::ConnectionAdapters::Mysql2Adapter.emulate_booleans = false
end
end