Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@matt2005
matt2005 / lambda_function.py
Last active April 23, 2024 14:33 — forked from awarecan/lambda_function.py
Alexa Smart Home Skill Adapter for Home Assistant
"""
Copyright 2019 Jason Hu <awaregit at gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@agtbaskara
agtbaskara / tilix_ubuntu_guide.md
Last active April 23, 2024 14:31
Installation Guide for Tilix on Ubuntu

Install Tilix on Ubuntu 20.04

Install Tilix

sudo apt-get install tilix

Fix Tilix VTE

sudo ln -s /etc/profile.d/vte-2.91.sh /etc/profile.d/vte.sh
sudo chmod +x /etc/profile.d/vte.sh
@pedrosancao
pedrosancao / revisao-commit.md
Last active April 23, 2024 14:29
Manual de Revisão de Commit

Manual de Revisão de Commit

O uso de repositórios GIT tem diversos benefícios: trabalho em equipe, desenvolvimento de recursos separadamente, histórico das alterações, etc. Mas para disponibilizar todo o potencial é preciso um pouco de dedicação no momento do commit.

Não é preciso uma vasta experiência para já ter passado por situações como conflito de arquivos onde a mensagem não traz nenhuma informações relevante e é preciso inverstigar o que a outra pessoa estava desenvolvendo ou após

@jc-torresp
jc-torresp / raspberry-pi-plex-server.md
Last active April 23, 2024 14:29
Setup a Raspberry Pi Plex Media Server (Including external storage media and Windows to Raspbian migration)

Raspberry Pi Plex Server

Installation

Ensure our operating system is entirely up to date:

sudo apt-get update
sudo apt-get upgrade
@OcarinhaOfTime
OcarinhaOfTime / fibonacci_gist_placer.cs
Last active April 23, 2024 14:28
Generates a point inside a circle using Fibonacci`s Lattice method.
Vector3 FibDisc(int i) {
var k = i + .5f;
var r = Mathf.Sqrt((k) / n);
var theta = Mathf.PI * (1 + Mathf.Sqrt(5)) * k;
var x = r * Mathf.Cos(theta) * radius;
var y = r * Mathf.Sin(theta) * radius;
return new Vector3(x, y, 0);
}
@pezcode
pezcode / projection.hpp
Last active April 23, 2024 14:25
Reversed Z + infinite far plane projection matrices with GLM
// these matrices are for left-handed coordinate systems, with depth mapped to [1;0]
// the derivation for other matrices is analogous
// to get a perspective matrix with reversed z, simply swap the near and far plane
glm::mat4 perspectiveFovReverseZLH_ZO(float fov, float width, float height, float zNear, float zFar) {
return glm::perspectiveFovLH_ZO(fov, width, height, zFar, zNear);
};
// now let zFar go towards infinity
glm::mat4 infinitePerspectiveFovReverseZLH_ZO(float fov, float width, float height, float zNear) {
@jbwhit
jbwhit / example-ruff-formatting.ipynb
Last active April 23, 2024 14:25
Steps to use `ruff` in JupyterLab with the `jupyterlab_code_formatter` plugin.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mid
mid / gist:37e0ddfa2d5fb13b68a763587a0a9521
Created June 22, 2017 16:16 — forked from farico/gist:3938084
Linksniavimas LT vardu
<?php
/**
* Lietuviškų vardų linksniai.
*
* @author Maug Lee <mauglee@gmail.com>
* @copyright Copyleft (ↄ) 2011, Maug Lee
* @version 0.3
* @package Vardai
*/
@jshaw
jshaw / byobuCommands
Last active April 23, 2024 14:23
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
" Function to quickly open/hide terminal window inside vim
" Terminal operation when
" 1. terminal is open in split window, it closes the window (terminal still
" running)
" 2. terminal open in buffer, it moves window into split window
" 3. no termial instance running then it opens new terminal instance in split
" window
function Term() abort
let bufNum = bufnr('term://')
let termNum = bufwinnr('term://')