Skip to content

Instantly share code, notes, and snippets.

View borisbrue's full-sized avatar
:shipit:
Das sieht gut aus! Was soll schon kaputt gehen? Oh

<bbr> borisbrue

:shipit:
Das sieht gut aus! Was soll schon kaputt gehen? Oh
View GitHub Profile
$response = $client->post('http://example.com/api', [
'multipart' => [
[
'name' => 'document',
'filename' => <filename>
'contents' => "@$path_to_file"
],
[
'name' => 'metadata',
'headers' => ['Content-Type' => 'application/json']
@borisbrue
borisbrue / zshrc_stuff
Created January 6, 2020 14:40
usefull ZSHRC scripts and aliases
# Activate Pyenv in shell
eval "$(pyenv init -)"
# Add Poetry to shell
export PATH=$HOME/.poetry/bin:$PATH
# Adding alias for pyenv to avoid warnings with brew doctor
alias brew='env PATH=${PATH//$(pyenv root)\/shims:/} brew'
# Visual Studio Code via zsh
@borisbrue
borisbrue / Max7219 on ESP32 using Micropython
Created October 25, 2019 19:36
Control Dot-Matrix with ESP32 Wroom
import max7219
from machine import Pin, SPI
spi = SPI(1, baudrate=10000000, polarity=1, phase=0, sck=Pin(14), mosi=Pin(13))
ss = Pin(15, Pin.OUT)
display = max7219.Matrix8x8(spi,ss,4)
display.text('1234',0,0,1)
display.show()
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 15
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40
# Daily Updates
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
defaults write com.apple.dashboard devmode -bool true
defaults write com.apple.ActivityMonitor ShowCategory -int 0