Skip to content

Instantly share code, notes, and snippets.

View gschri's full-sized avatar
💭
Taming bytes @ www ( world wild west )

Gabriel Schimit gschri

💭
Taming bytes @ www ( world wild west )
View GitHub Profile
@gschri
gschri / i3-cheat-sheet.md
Created December 25, 2017 02:15 — forked from JeffPaine/i3-cheat-sheet.md
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@gschri
gschri / Phoenix JWT.md
Created July 3, 2018 18:52 — forked from peterrudenko/Phoenix JWT.md
Elixir + Phoenix Framework 1.3 + Guardian + JWT(Refresh, Revoke, Recover) + Comeonin

Elixir + Phoenix Framework 1.3 + Guardian + JWT(Refresh, Revoke, Recover) + Comeonin

User model bootstrap

Let's generate User model and controller.

mix ecto.create
mix phoenix.gen.json Accounts User users email:string password_hash:string
@gschri
gschri / tiny-vm.ml
Created September 1, 2018 16:29
Tiny VM in OCaml - learning
(*
Some time ago I found this tutorial about writing a small VM in c.
http://blog.felixangell.com/blog/virtual-machine-in-c
Here's something similar in OCaml. Nothing super fancy and a lot of room for improvements.
But it's a start :)
*)
open Core.Std
type registers = {
mutable a: int;
@gschri
gschri / scala-patterns.scala
Created September 13, 2018 12:59 — forked from rcoh/scala-patterns.scala
Scala patterns for compiler construction
// Useful Scala Patterns for Compiler Design
// 1. Case Classes
// [For full details, see Programming in Scala 2ed, page 310]
// Case classes are syntactic sugar around normal Scala classes. They come prebaked with the following properties:
// * Factory constructor (don't need new) :
case class Foo(bar: String)
@gschri
gschri / GLSL-Noise.md
Created May 27, 2022 00:45 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
@gschri
gschri / 360TimelapseTutorial.md
Created July 16, 2022 02:46 — forked from Tomasvrba/360TimelapseTutorial.md
HD 360° Timelapse and FFmpeg tutorial

How to capture, stitch and publish a 360° timelapse

Consumer ready 360° cameras are becoming ever more accessible and many people are experimenting with a variety of 360° content. Out of the many cameras on the market the Ricoh Theta S is one of the most user-friendly, turn-key solutions with lots of built-in features. However, the camera's videos are limited 1920x960 resolution and the Theta+ app only lets you create a timelapse with up to 300 or 400 images. The workaround is to use interval shooting to capture as many images as you'd like at the 5376x2688 to full resolution and then stitch them together manually into an HD video. There are few GUI solutions (especially open-source/free) which let you do this with ease. Here's how you do it:

Set up interval shooting on your Ricoh Theta S

@gschri
gschri / audit-on-push.yml
Created July 24, 2022 21:19 — forked from LukeMathWalker/audit.yml
GitHub Actions - Rust setup
name: Security audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps: