Skip to content

Instantly share code, notes, and snippets.

@ftvs
ftvs / CameraShake.cs
Last active May 8, 2024 20:34
Simple camera shake effect for Unity3d, written in C#. Attach to your camera GameObject. To shake the camera, set shakeDuration to the number of seconds it should shake for. It will start shaking if it is enabled.
using UnityEngine;
using System.Collections;
public class CameraShake : MonoBehaviour
{
// Transform of the camera to shake. Grabs the gameObject's transform
// if null.
public Transform camTransform;
// How long the object should shake for.
@luisg0nc
luisg0nc / hybrid_kubernetes_using_ovn.md
Last active May 8, 2024 20:31
Compiles all necessary information on how to setup a Kubernetes with both Linux and Windows Nodes, enabling both use of Windows and Linux docker containers.

Hybrid Kubernetes with OVN

This gist compiles all necessary information on how to setup a Kubernetes with both Linux and Windows Nodes, enabling both use of Windows and Linux docker containers, using ovn-kubernetes as the network plugin on bare metal servers.

Two machines are required to run this, one will be running Linux Ubuntu and will act as our Master in the cluster and the other machine will be running Windows which will be added to our cluster as a Work Node able to run Windows Containers.

@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active May 8, 2024 20:31
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@patpohler
patpohler / Big List of Real Estate APIs.md
Last active May 8, 2024 20:28
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

This was written in response to bitcoin/bitcoin#27578 and any other number of occurrences of the topic.

“Standardness policy” is a term for a transaction that would be consensus-legal, but our node doesn’t want to relay for various reasons. Clearly if it’s consensus valid we want to accept it to not split the network if a miner chooses a “weird” transaction to mine.

There are N motivations for policy that I know of:

  1. Anti-DoS: Only “cheap” things to validate get flooded to the network
  2. Security: Certain types of transactions may mess up certain systems for no good reason
  3. Upgrade hooks: We leave some things “forbidden” such that if we find a use for them later we don’t “confiscate” funds by refusing to relay e.g., a spend or pre-signed transaction
  4. Pro-decentralization: Make it simple/cheap for miners to build blocks that pay well
@chrisswanda
chrisswanda / WireGuard_Setup.txt
Last active May 8, 2024 20:24
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@ursulacj
ursulacj / Create-branch-with-Github-API.md
Last active May 8, 2024 20:24 — forked from auwsome/Create-branch-with-Github-API.md
Create a branch on Github using API and Python

Create a branch on Github using API and Python

Created as a module that can be imported or run. Requires built in JSON, requests, and datetime modules.

Allows you to clone a branch on Github using the Github Git Database API Endpoints.

Forked Gist from:

  • auwsome/Create-branch-with-Github-API.md

See:

@BigOokie
BigOokie / MacOS-Multi-Version-Go-With-Homebrew.md
Last active May 8, 2024 20:22
Manage multiple versins of Go on MacOS with Homebrew

This process would likely apply to other Homebrew formula also.

First search for your desired package:

brew search go

You should get a list of results that include the below. Not "go" is very unspecific so you may get a lot of results:

@jsignell
jsignell / pre-commit-ci.yml
Last active May 8, 2024 20:22
Github Action to run pre-commit on files changed between target branch and base branch
name: pre-commit-ci
on:
pull_request:
branches:
- main
jobs:
pre-commit-ci:
name: Lint changed backend files
runs-on: ubuntu-latest
steps:
@kimsama
kimsama / Unity-GetAllFilesUnderSelectedFoder.cs
Last active May 8, 2024 20:22
Code snip which shows gather all files under selected folder in Unity's Project View
/// <summary>
/// Retrieves selected folder on Project view.
/// </summary>
/// <returns></returns>
public static string GetSelectedPathOrFallback()
{
string path = "Assets";
foreach (UnityEngine.Object obj in Selection.GetFiltered(typeof(UnityEngine.Object), SelectionMode.Assets))
{