Skip to content

Instantly share code, notes, and snippets.

View antpaw's full-sized avatar
♟️

Anton Pawlik antpaw

♟️
View GitHub Profile
*~
.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 / 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
@antpaw
antpaw / .gitignore
Created May 22, 2019 09:31
Unity .gitignore
/.gradle/
/.vscode/
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Ll]ogs/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*
/Assets/tmp/_ignored/
@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 / index.js
Last active April 3, 2019 08:29
Get Country ISO codes with translated names
// https://laendercode.net/de/2-letter-list.html
var table = document.querySelectorAll('.table')[0]
var codes = [].slice.call(table.querySelectorAll("h4")).map(function(elem) { return elem.innerText; })
var names = [].slice.call(table.querySelectorAll("td:last-child a")).map(function(elem) { return elem.innerText; })
var object = codes.map(function(code, i) { return {code, name: names[i]}; })
var elem = document.createElement("textarea");
elem.cols = "100";