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
#!/bin/sh
set -e
for cask in $(brew cask outdated | awk '{ print $1 }'); do
brew cask uninstall --force "${cask}"
brew cask install "${cask}"
done
@andrzejkaszkowiak
andrzejkaszkowiak / GIF-Screencast-OSX.md
Created May 10, 2017 10:05 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@andrzejkaszkowiak
andrzejkaszkowiak / git.migrate
Created March 28, 2017 12:57 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@andrzejkaszkowiak
andrzejkaszkowiak / git-cleanup-repo
Created December 24, 2016 05:10 — forked from robmiller/git-cleanup-repo
A script for cleaning up Git repositories; it deletes branches that are fully merged into `origin/master`, prunes obsolete remote tracking branches, and as an added bonus will replicate these changes on the remote.
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# Adapted from the original by Yorick Sijsling
git checkout master &> /dev/null
# Make sure we're working with the most up-to-date version of master.
git fetch
@andrzejkaszkowiak
andrzejkaszkowiak / .gitconfig
Created December 24, 2016 05:10 — forked from robmiller/.gitconfig
A git alias to find out what changes were introduced by the last merge.
# usage, e.g.:
# git difftool `git last-merge`
# or:
# git log `git last-merge`
last-merge = "!echo $(git log -1 --merges --pretty=format:%P | cut -d' ' -f1)..$(git log -1 --merges --pretty=format:%P | cut -d' ' -f2)"
@andrzejkaszkowiak
andrzejkaszkowiak / .gitconfig
Created December 24, 2016 05:10 — forked from robmiller/.gitconfig
Want to find out what changes were introduced by a particular merge commit? Hey, so do I! ALL THE TIME. These aliases will do that.
# `git merge-log` shows the commits that were introduced in a given merge
# `git merge-diff` shows the actual changes that were introduced by a given merge
# Both commands accept an optional commitish; if ommitted, the last merge commit is used
merge-span = "!f() { echo $(git log -1 $2 --merges --pretty=format:%P | cut -d' ' -f1)$1$(git log -1 $2 --merges --pretty=format:%P | cut -d' ' -f2); }; f"
merge-log = "!git log `git merge-span .. $1`"
merge-diff = "!git diff `git merge-span ... $1`"
merge-difftool = "!git difftool `git merge-span ... $1`"
@andrzejkaszkowiak
andrzejkaszkowiak / .gitconfig
Created December 24, 2016 05:09 — forked from robmiller/.gitconfig
A Git alias for tagging the previous commit as having been reviewed. Useful just after a merge
# Usage:
# git tag-review 'Rob Miller <rob@example.com>'
tag-review = "!f() { git commit --amend -m \"$(git log -1 --pretty=\"format:%s%n%n%b%n%nReviewed-by: $1\")\"; }; f"
@andrzejkaszkowiak
andrzejkaszkowiak / .gitconfig
Created December 24, 2016 05:09 — forked from robmiller/.gitconfig
A few useful commands for working with branches
# git branch-name: prints the name of the branch in a safe/scriptable/non-porcelain way
# git publish: publishes the current branch on the remote "origin", using the same name as the current branch
# git unpublish: deletes the remote branch with the same name as the current one (potentially destructive)
# git recreate: given a branch name, recreates the branch with that name from the latest master. Deletes both the local and remote copy of the branch first. Very destructive, use with caution
branch-name = "!git rev-parse --abbrev-ref HEAD"
publish = "!git push -u origin $(git branch-name)"
unpublish = "!git push origin :$(git branch-name)"
recreate = "!f() { [[ -n $@ ]] && git checkout \"$@\" && git unpublish && git checkout master && git branch -D \"$@\" && git checkout -b \"$@\" && git publish; }; f"