Skip to content

Instantly share code, notes, and snippets.

View antpaw's full-sized avatar
♟️

Anton Pawlik antpaw

♟️
View GitHub Profile
@antpaw
antpaw / git.sh
Created May 6, 2024 11:53
Bulk merge
# Accept the remote version for all conflicting files with:
git rebase --strategy-option theirs
# Alternatively, to accept the local version for all conflicting files, use:
git rebase --strategy-option ours
*~
.DS_Store
.vscode/
.idea/
noremap <Up> <Nop>
noremap <Down> <Nop>
noremap <Left> <Nop>
noremap <Right> <Nop>
set hls
set ic
set is
set nu
set noswf
@antpaw
antpaw / biome.json
Last active December 16, 2023 08:36
Biome defaults
{
"$schema": "https://biomejs.dev/schemas/1.4.0/schema.json",
"files": {
"ignore": ["**/__generated__/*"]
},
"linter": {
"rules": {
"style": {
"useBlockStatements": "error",
"useShorthandArrayType": "error",
@antpaw
antpaw / s3_rename.sh
Created November 21, 2022 12:54
list s3 and iterate
#!/bin/bash
SOURCE_BUCKET="some-bucket-x"
PROFILE="my-profile"
content=$(aws s3api list-objects-v2 --profile=$PROFILE --bucket $SOURCE_BUCKET --query 'Contents[?(LastModified > `2021-09-01`)]' --prefix some/path | jq -r ".[].Key")
for file in $content;
do
XE=$(echo $file | sed -e "s/.png.png/.png/g")
@antpaw
antpaw / main.sh
Created September 7, 2021 08:13
Generate Secret Key
openssl rand -base64 10
@antpaw
antpaw / example.cs
Created April 27, 2021 15:33
SaveData Serialization to Unity Filesystem
public class Something
{
SaveData saveData;
void Save()
{
BinaryFormatter bf = new BinaryFormatter();
FileStream file = File.Create(FileLocation());
bf.Serialize(file, saveData);
file.Close();
@antpaw
antpaw / extensions.json
Last active April 13, 2020 10:35
Unity default config .vscode dir
{
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"ms-dotnettools.csharp",
"leopotam.csharpfixformat",
"streetsidesoftware.code-spell-checker",
"unity.unity-debug",
"editorconfig.editorconfig",
@antpaw
antpaw / font.sh
Last active November 8, 2019 08:51
Fix font rendering on macOS for low DPI monitors
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
defaults write com.microsoft.VSCodeInsiders CGFontRenderingFontSmoothingDisabled 0
defaults write com.microsoft.VSCodeInsiders.helper CGFontRenderingFontSmoothingDisabled 0
defaults write com.microsoft.VSCodeInsiders.helper.EH CGFontRenderingFontSmoothingDisabled 0
defaults write com.microsoft.VSCodeInsiders.helper.NP CGFontRenderingFontSmoothingDisabled 0
@antpaw
antpaw / remove_unused.sh
Created October 31, 2019 15:47
remove unused store screenshots form export
#!/usr/bin/env bash
# export with https://github.com/jtholloran/shots
rm -r ~/Desktop/App/shots/iPhone_4
rm -r ~/Desktop/App/shots/iPhone_SE
rm -r ~/Desktop/App/shots/iPhone_678
rm -r ~/Desktop/App/shots/iPhone_XS
rm -r ~/Desktop/App/shots/iPhone_XR