Skip to content

Instantly share code, notes, and snippets.

View ArtBIT's full-sized avatar
🤖
Explore, Experiment, Evolve

ArtBIT ArtBIT

🤖
Explore, Experiment, Evolve
View GitHub Profile
" IdeaVim Wiki https://github.com/JetBrains/ideavim/wiki
" Find more examples here: https://jb.gg/share-ideavimrc
" The Essential IdeaVim Remaps https://towardsdatascience.com/the-essential-ideavim-remaps-291d4cd3971b
let mapleader=" "
""" Common settings
set showmode
set scrolloff=5
" Do incremental searching.
@sbyx
sbyx / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active July 1, 2024 09:57
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').

Setup

  • Create a developer account with Apple
  • Download and install X-Code from the Apple App Store
  • Open and run X-Code app and install whatever extras it requires
  • Open the preferences pane (cmd+,)
    • click the + in the lower right corner
    • choose Apple ID
    • enter your apple ID and password
@Whoaa512
Whoaa512 / Stacked-diff-steps.md
Last active September 28, 2023 08:05
Cheatsheet for the stacked diffs workflow in phabricator at Fictiv

stack diff steps

  1. Checkout & pull latest master
git checkout master && git pull --rebase origin master
  1. Cut branch from master
arc branch stacked_feature_1
  1. Make changes, add commits
@imaegoo
imaegoo / README.md
Last active February 24, 2024 02:11
Ribbon a background of website draw on canvas

Usage

Add this line into document <body>

<script type="text/javascript" src="ribbon.js"></script>
@ArtBIT
ArtBIT / kako_ime_zvuči_uz_prezime
Created November 24, 2017 12:59
Poslušaj kako zvuči ime uz prezime, koristeći program `espeak`
#!/bin/bash
# Primer:
# bash kako_ime_zvuči_uz_prezime Kovačević
# ...Momčilo, Momčilo Kovačević
# ...Višeslav, Višeslav Kovačević
PREZIME=$1
for IME in $(cat muška.imena.txt); do
espeak -m -v sr "<prosody rate='0.7'>$IME</prosody><break time='1000' /><prosody rate='1'>$IME $PREZIME</prosody><break time='1000' />"

Generating Procedural Game Worlds with Wave Function Collapse

Wave Function Collapse (WFC) by @exutumno is a new algorithm that can generate procedural patterns from a sample image. It's especially exciting for game designers, letting us draw our ideas instead of hand coding them. We'll take a look at the kinds of output WFC can produce and the meaning of the algorithm's parameters. Then we'll walk through setting up WFC in javascript and the Unity game engine.

sprites

The traditional approach to this sort of output is to hand code algorithms that generate features, and combine them to alter your game map. For example you could sprinkle some trees at random coordinates, draw roads with a brownian motion, and add rooms with a Binary Space Partition. This is powerful but time consuming, and your original vision can someti

@max-mapper
max-mapper / bibtex.png
Last active March 10, 2024 21:53
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@akatrevorjay
akatrevorjay / git-fshow
Last active May 19, 2024 01:39 — forked from junegunn/gist:f4fca918e937e6bf5bad
Browsing git commit history with fzf
#!/bin/zsh
# git-fshow - git commit browser
#
# https://gist.github.com/akatrevorjay/9fc061e8371529c4007689a696d33c62
# https://asciinema.org/a/101366
#
git-fshow() {
local g=(
git log
@xiaolai
xiaolai / nvmrc
Created June 28, 2016 08:42
bash function for load .nvmrc automatically
# for nvm
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"
load-nvmrc() {
if [[ -f .nvmrc && -r .nvmrc ]]; then
nvm use
elif [[ $(nvm version) != $(nvm version default) ]]; then
echo "Reverting to nvm default version"
nvm use default