Skip to content

Instantly share code, notes, and snippets.

View iharkatkavets's full-sized avatar
💻
Code is like humor. When you have to explain it, it's bad

Ihar Katkavets iharkatkavets

💻
Code is like humor. When you have to explain it, it's bad
View GitHub Profile
// stash a view (0x7f84c74ca870 address)
e UIView *$cell = (UIView *)[0x7f84c74ca870 superview]
// set a new frame
e (void)[$cell setFrame:(CGRect){0.f, 324.f, 10.f, 54.f}]
// update
caflush frame
// get a glance at the identities ("SHA1" "Name")
$ security find-identity -v -p codesigning
// get information about the code signing status
$ codesign -vv -d Payload/Example.app
// entitlements embedded in binary
$ codesign -d --entitlements - Payload/Example.app/
// verify provision profile
//0 unzip
$ unzip awesome.ipa
//1 remove signature artifacts
$ rm -rf Payload/awesome.app/
//2 update provision profile
$ mv APP_PROVISION_PROFILE.mobileprovision Payload/awesome.app/embedded.mobileprovision
//3 resign binary file
// execute request, grep string 'EXTIN' and count number of lines with 'EXTIN' string
$ curl -v --silent HTTP_URL_PROVIDED 2>&1 | grep EXTIN | wc -l
# convert .mov file to .git
$ ffmpeg -ss 00:00:00.000 -i in.mov -pix_fmt rgb24 -r 10 -t 00:00:03.000 output.gif
# OS X
.DS_Store
# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
// take a frame at specified time
$ ffmpeg -ss 00:02:04.400 -i 03241225_0031.MP4 -vframes 1 -q:v 2 ~/Desktop/output1.jpg
XXAwesomeInteractor, XXAwesomeManager, XXAwesomeComputations, XXAwesomeLoader, XXISOCodesDecoder, XXTimeIntervalFormatter, XXVODInfoMapper
@iharkatkavets
iharkatkavets / dlsym_upload.sh
Last active December 4, 2018 17:47
Xcode. Build-Scripts
#!/bin/bash
echo "API KEY ${FABRIC_API_KEY}"
echo "Look for dSym files at ${BUILT_PRODUCTS_DIR}..."
FILES=($(find "${BUILT_PRODUCTS_DIR}" -iname '*.dSym' 2>/dev/null))
for file in "${FILES[@]}"; do
"${PODS_ROOT}/Fabric/upload-symbols" -d -a "${FABRIC_API_KEY}" -p ios "${file}"
done
import UIKit
import Swinject
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
let diResolver = {
Assembler([CoreAssembly(),
MainAssembly(),
PasswordAssembly(),
FilesListAssembly()]).resolver