Skip to content

Instantly share code, notes, and snippets.

View gregkrsak's full-sized avatar
🥰

Greg M. Krsak gregkrsak

🥰
  • Washington, USA
View GitHub Profile
@gregkrsak
gregkrsak / installed.sh
Last active December 8, 2022 04:13
A running log of the post-install apps I've installed on Lubuntu
# Greg's default post-install apps for Lubuntu
##########################################################
# SNAP #
##########################################################
# Visual Studio Code editor
snap install code --classic
@gregkrsak
gregkrsak / mandelbrot.asm
Created June 7, 2018 06:25
Mandelbrot ASM code from /u/balkenbrij on Reddit
;;
;; Draw a grayscale mandelbrot fractal
;;
;; i compiled with yasm: yasm -o mandel.com mandel.asm
;; but i think it should be quite portable to other assemblers.
;;
SECTION .data
maxi: equ 128 ; upto maxi iterations per pixel
@gregkrsak
gregkrsak / gist:7e5f8cbcd501006d36ee
Created August 1, 2014 21:02
Getting a "No pool named default" error
// http://stackoverflow.com/questions/25088258/golang-how-do-i-create-a-new-couchbase-pool/
// ...
client, err := couchbase.Connect("http://127.0.0.1:8091")
pool, err := client.GetPool("default")
// ...
// Getting a "No pool named default" error with Couchbase 2.2.0 CE
@gregkrsak
gregkrsak / coders-philosophy.md
Created March 29, 2014 17:43
Wise words from a presenter at an Art Institute of Portland graduation ceremony, Mar. 28, 2014.

Be Prolific

Get stuff out there and iterate. Don't marry your first idea. Get ideas down fast. Be a strong self editor. "Does this shine" / "is this new or better"

Embrace Critique

Be able to process critical feedback. You are also then obligated to give direct feedback. Be a go to resource.

Fall in Love

Antivenom ISA
Matt Snyder & Greg Krsak
~5 gal batch
4.0% ABV
OG 1.041
60% efficiency
Grain temp 70F
@gregkrsak
gregkrsak / array_duplicates.rb
Created March 10, 2014 04:28
Finding duplicate elements in an array
#!/usr/bin/env ruby
# Problem: Find the duplicate values in a 1..n array
# CREATE THE PROBLEM
# Size of the data set
dataset_size = 100
# The data set: This will become an array of numbers
numbers = []
@gregkrsak
gregkrsak / GKPearsonHash.h
Last active August 29, 2015 13:56
Implementation of Pearson hash functions, including 64-bit.
//
// GKPearsonHash.h
//
// Pearson hashing in C++
// Based on an example from http://en.wikipedia.org/wiki/Pearson_hashing
//
// Copyright 2014 Greg M. Krsak (greg.krsak@gmail.com)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@gregkrsak
gregkrsak / update-submodules
Created February 4, 2014 20:49
A small Bash script to update git submodules.
#!/bin/bash
#
# update-submodules
#
# Updates all submodules of a git project.
# by Greg Krsak <greg.krsak@gmail.com>, Feb. 4, 2014
#
read -r -d '' USAGE << EOF
Usage: update-submodules [<options>]
@gregkrsak
gregkrsak / GKSphericalGravitySingularity.boo
Last active August 29, 2015 13:56
The physics object is the base class of all objects in spherical gravity. The singularity is an "attractor" of objects in spherical gravity, implemented as a trigger.
# GKSphericalGravitySingularity.boo
#
# Copyright (c) 2013 Greg M. Krsak (greg.krsak@gmail.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions: