Skip to content

Instantly share code, notes, and snippets.

View skorianez's full-sized avatar
🏠
Working from home

Leonardo Skorianez skorianez

🏠
Working from home
View GitHub Profile
@skorianez
skorianez / main.odin
Last active October 10, 2024 15:07
OpenGL in Odin
package new
import gl "vendor:OpenGL"
import "vendor:glfw"
main :: proc() {
// glfw: initialize and configure
glfw.Init()
glfw.WindowHint(glfw.CONTEXT_VERSION_MAJOR, 3)
glfw.WindowHint(glfw.CONTEXT_VERSION_MINOR, 3)
@skorianez
skorianez / main.odin
Created October 3, 2024 14:56
Interate over "objects"
package main
import "core:fmt"
base :: struct {
name : string,
}
obj :: union {
circle,
@skorianez
skorianez / gist:1308103
Created October 24, 2011 00:06
JCrop + Carrierwave
# https://github.com/gzigzigzeo/carrierwave-meta
# Integrating CarrierWave with JCrop
# Let implement the behavior like at this demo: deepliquid.com/projects/Jcrop/demos.php?demo=thumbnail
# The uploader:
class CropUploader < SobakaUploader
include CarrierWave::Meta
# Crop source is a source image converted from original which could be bigger than source area (left image in the example).
version :crop_source do