Skip to content

Instantly share code, notes, and snippets.

View GammaGames's full-sized avatar
🎃
👉😎👉 zoop

Jesse GammaGames

🎃
👉😎👉 zoop
View GitHub Profile
- height*curse:
- 1@25:-,1:=curse
- height*moisture:
- 1@2:rock,1:snow
- 1@2:grass,3:plants
- 2@moisture*fertility:
- 1@1:dirt,2:grass,3:plants
- 2@2:dirt,3:grass,1:plants
- 1@3:sand,2:dirt
- 1@2:sand,1:dirt,1:grass,1:plants,2:=water
@GammaGames
GammaGames / release.js
Last active August 12, 2019 03:13
Get the latest release and assets for a github repo from a static javascript page
let username = "";
let repo = "";
window.onload = () => {
fetch(`https://api.github.com/repos/${username}/${repo}/releases/latest`).then(response => {
response.json().then(json => {
console.log(json);
});
});
}
@GammaGames
GammaGames / Area.gd
Last active August 24, 2019 04:09
Godot Viewport Input from Raycast (Useful for VR)
extends Area
onready var viewport = $"../Viewport"
onready var collion = $CollisionShape
var last_collided = Vector3.ZERO
var mouse_mask = 0
var mesh_size_x = 0.5
var mesh_size_y = 0.5
var uv_offset_x = -0.1
var uv_offset_y = -0.1
@GammaGames
GammaGames / plaintext.json
Last active October 25, 2019 04:18
enjamb vscode snippets
{
"putc": {
"prefix": "putc",
"body": [
"."
]
},
"putn": {
"prefix": "putn",
"body": [
@GammaGames
GammaGames / batch_obj_export.py
Last active May 20, 2022 17:46
Batch obj file exporter for blender 2.8, now with mesh centering
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@GammaGames
GammaGames / is_duck.py
Created January 22, 2020 18:31
Check if object has method and return function result
class Duck():
def quack(self):
print("quack!")
class Goose(Duck):
def quack(self):
print("honk!")

Basic

  1. Create a new repo (gp-pages-simple)
  2. Go to settings
  3. Choose a theme
  4. Edit your index.md file
  5. Commit to master branch
  6. Go to username.github.io/gp-pages-simple

http://jekyllthemes.org/

@GammaGames
GammaGames / test.sh
Last active June 5, 2020 15:11
Pipe commands to docker container from host
#!/bin/sh
echo "foo"
# Pipe commands between patterns into container
sed -n "/^### SCRIPT START ###/,/^### SCRIPT END ###/p" "$0" | docker exec -i -e MESSAGE="bar" <id> /bin/bash -
echo "baz"
# Exit original script
exit
@GammaGames
GammaGames / gamma.omp.json
Last active October 27, 2021 15:18
Personal Oh My Posh config
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "session",
"style": "plain",
@GammaGames
GammaGames / color.py
Last active December 21, 2021 22:40
Create colored text to copy/paste into other applications using python
import click
import webbrowser
import os
import random
import tempfile
from time import sleep
random.seed()
tmp = tempfile.NamedTemporaryFile()