Skip to content

Instantly share code, notes, and snippets.

View brunurd's full-sized avatar

Bruno Araujo brunurd

View GitHub Profile
@moniquelive
moniquelive / first_shader.elm
Created September 9, 2021 03:39
Nosso primeiro shader em ELM WebGL
-- Render a spinning cube.
--
-- Dependencies:
-- elm install elm-explorations/linear-algebra
-- elm install elm-explorations/webgl
--
import Browser
import Browser.Events as E
import Html exposing (Html)
@joseluisq
joseluisq / resize_disk_image.md
Last active April 16, 2025 13:33
How to resize a qcow2 disk image on Linux

How to resize a qcow2 disk image on Linux

This example takes olddisk.qcow2 and resizes it into newdisk.qcow2, extending one of the guest's partitions to fill the extra space.

1. qcow2 format

1.1. Verify the filesystems of olddisk.qcow2

@crykn
crykn / switch_to_lwjgl3.md
Last active September 2, 2024 16:50
How to switch to libGDX's LWJGL3 backend

How to switch your libGDX project to LWJGL 3


--- This guide is now available on libgdx.com. Check it out here. If you have any questions, join us on Discord! ---


  1. To switch to libGDX's LWJGL 3 backend, open your root build.gradle file and replace the LWJGL backend dependency:
@austinmartinh
austinmartinh / DB Instances
Created May 28, 2020 10:17
Results of describing DB instances
{
"DBInstances": [
{
"DBInstanceIdentifier": "hcdrestrictedzv6lsredhatrhmioperato-4hoz",
"DBInstanceClass": "db.t2.small",
"Engine": "postgres",
"DBInstanceStatus": "available",
"MasterUsername": "postgres",
"DBName": "postgres",
"Endpoint": {
@alex3165
alex3165 / aws-lambda-authorizer-google.js
Created July 10, 2019 17:25
An AWS lambda authorizer that work with google access token
const axios = require("axios");
exports.handler = async event => {
const token = event.authorizationToken;
console.log(`Received token`, token);
let googleAuthRes;
try {
googleAuthRes = await axios.get(
`https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=${token}`
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active April 24, 2025 13:43
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@krzys-h
krzys-h / UnityWebRequestAwaiter.cs
Created July 20, 2018 22:47
[Unity] Use UnityWebRequest with async/await
public class UnityWebRequestAwaiter : INotifyCompletion
{
private UnityWebRequestAsyncOperation asyncOp;
private Action continuation;
public UnityWebRequestAwaiter(UnityWebRequestAsyncOperation asyncOp)
{
this.asyncOp = asyncOp;
asyncOp.completed += OnRequestCompleted;
}
@joshnuss
joshnuss / udp_server.exs
Last active June 17, 2024 11:45
Fault tolerant UDP Server in Elixir
# to run:
# > elixir --no-halt udp_server.exs
# to test:
# > echo "hello world" | nc -u -w0 localhost 2052
# > echo "quit" | nc -u -w0 localhost 2052
# Let's call our module "UDPServer"
defmodule UDPServer do
# Our module is going to use the DSL (Domain Specific Language) for Gen(eric) Servers
use GenServer
@borekb
borekb / README.md
Last active November 15, 2024 23:41
Docker and Git Bash / MSYS2 on Windows: path conversion workaround

👋 Moved to https://github.com/borekb/docker-path-workaround


Docker in Git Bash / MSYS2 on Windows: path conversion workaround

UPDATE 07/2018: I switched from Git Bash to MSYS2 recently which should be very similar, if not the same, but there some subtle differences which made me realize this is more tricky than I thought and that I don't 100% understand what is going on. If someone can help, please let me know in the comments.

Invoking docker in MSYS2 shell or Git Bash typically fails with complains about paths, for example:

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 24, 2025 17:38
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example