Skip to content

Instantly share code, notes, and snippets.

@baquaz
baquaz / CellAttributesShowcaseListViewController.md
Created May 17, 2023 08:18 — forked from AngrenWen/CellAttributesShowcaseListViewController.md
Presentation of predefined UICollectionView cells (iOS 14)
@baquaz
baquaz / provisioning2xml.sh
Last active August 27, 2019 05:28
Looking into provisioniong profile (.mobileprovision)
#!/bin/bash
# Usage: provide 2 parameters(provisioning profile path and new filename)
#
# sh ./provisioning2xml.sh path xml_name
path=$1
name=$2
echo "Generating $name.xml from path: $path"
security cms -D -i "$path" >> ./"$name".xml
echo "Finished"
@baquaz
baquaz / gist:8f139077fc473ce47017381608d3b0f7
Created August 22, 2019 10:52 — forked from danielbraun/gist:27e43b914c6a2e081792
Vim syntax coloring for Cocoapods' Podfile.
// Append this to your .vimrc
au BufNewFile,BufRead Podfile set filetype=ruby
@baquaz
baquaz / RemovingByIndex.swift
Last active June 6, 2018 06:17
Another way to remove item from collection
guard let index = items.index(where: {$0 == item})
else {
return
}
items.remove(at: index)
@baquaz
baquaz / ArrayStorage.swift
Last active April 18, 2018 14:46
A class that saves and retrieves an array to the device
//: Playground - a class that saves and retrieves an array to the device
import Foundation
class ArrayStorageManager: NSObject {
static let shared = ArrayStorageManager()
private var documentsDirectoryURL: URL {
let url = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first
return url!
@baquaz
baquaz / GIF-Screencast-OSX.md
Created April 5, 2018 13:47 — 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:

@baquaz
baquaz / .gitconfig
Last active April 24, 2018 11:52
Human Git Aliases
[alias]
st = status
coma = commit -a
amend = commit --amend
amenda = amend -a
discard = checkout --
unstage = reset HEAD --
save = commit -m
gl = log --oneline --decorate --graph --all
@baquaz
baquaz / Git-notatki.md
Last active April 1, 2018 16:39
Informacje, polecenia...

Struktura Commita:

  • stan struktury w drzewie plików
  • metadata (autor, data)
  • referencja do rodzica (poprzedniego brancha)

Struktura Brancha:

  • implementowany jako plik przechowujący SHA1 hash.

  • Lokalizacja: .git/refs/heads/mójBranch