Skip to content

Instantly share code, notes, and snippets.

View andrzejkaszkowiak's full-sized avatar

Andrzej Kaszkowiak andrzejkaszkowiak

  • Poland
View GitHub Profile
@andrzejkaszkowiak
andrzejkaszkowiak / Gemfile
Created May 22, 2022 14:42 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@andrzejkaszkowiak
andrzejkaszkowiak / displaysizes.txt
Created March 1, 2021 07:56 — forked from marcedwards/displaysizes.txt
iPhone, iPad, and Apple Watch display sizes
### Points and display type
PPI is points per inch below, not pixels per inch. Not all models are listed, just the first model with a new display size. Diamond, RGB Stripe and Pentile RGB refer to the subpixel patterns.
iPhone 1 = 320×480 at 163ppi sRGB IPS LCD RGB Stripe
iPhone 4 = 320×480 at 163ppi sRGB IPS LCD RGB Stripe
iPhone 5 = 320×568 at 163ppi sRGB IPS LCD RGB Stripe
iPhone 6 = 375×667 at 163ppi sRGB IPS LCD RGB Stripe
iPhone 6 Plus = 414×736 at 153.5ppi sRGB IPS LCD RGB Stripe
iPhone 7 = 375×667 at 163ppi P3 IPS LCD RGB Stripe
@andrzejkaszkowiak
andrzejkaszkowiak / check-for-VTx-support-on-mac.sh
Created October 1, 2020 06:10
Check for VT-x support on Mac
#!/bin/bash
sysctl -a | grep machdep.cpu.features | grep VMX
#!/bin/bash
# https://www.hanselman.com/blog/EasilyRenameYourGitDefaultBranchFromMasterToMain.aspx
# git branch -m master main
# git push -u origin main
git checkout master
git branch -m master main
git fetch
git branch -m master main; git push -u origin main
@andrzejkaszkowiak
andrzejkaszkowiak / md5today.sh
Created April 22, 2020 05:19
Prints to console an MD5 hash from Today's date formatted as following: 'dd/MM/yyyy'.
#!/bin/bash
date=$(date '+%d/%m/%Y')
# -q — quiet mode - only the checksum is printed out
md5 -q -s $date
@andrzejkaszkowiak
andrzejkaszkowiak / install-font-fira.sh
Created April 17, 2020 04:32
Install Fira font family on macOS using Homebrew Cask • https://github.com/mozilla/Fira
# Install Fira font family on macOS using Homebrew Cask • https://github.com/mozilla/Fira
brew tap homebrew/cask-fonts
brew cask install \
font-fira-sans \
font-fira-mono \
font-fira-mono-for-powerline
@andrzejkaszkowiak
andrzejkaszkowiak / ArrangeActAssert.snippet
Created July 29, 2019 07:39
"Arrange Act Assert" Visual Studio snippet
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>ArrangeActAssert</Title>
<Author>Andrzej Kaszkowiak</Author>
<Description>
@andrzejkaszkowiak
andrzejkaszkowiak / res-toggle-iMacPro5K-radiobtn.scpt
Last active February 13, 2019 19:53
Switch resolution on iMac (Pro) 5K
tell application "System Preferences"
reveal anchor "displaysDisplayTab" of pane "com.apple.preference.displays"
end tell
tell application "System Events" to tell process "System Preferences" to tell window "Built-in Retina Display" to tell tab group 1
if (value of radio button "Scaled" of radio group 1) = 0 then
click radio button "Scaled" of radio group 1
click radio button 5 of radio group 1 of group 1
else
click radio button "Default for display" of radio group 1
@andrzejkaszkowiak
andrzejkaszkowiak / git-empty-commit
Created September 5, 2018 09:56
Git empty commit (to test TeamCity builds)
git commit --allow-empty -m "Trigger build"