Skip to content

Instantly share code, notes, and snippets.

View pingwinator's full-sized avatar
📱
iOS Software Engineer

Vasyl Liutikov pingwinator

📱
iOS Software Engineer
View GitHub Profile
require 'mini_magick'
require_relative 'template_finder'
require_relative 'trim_box'
require_relative 'module'
require_relative 'offsets'
require_relative 'config_parser'
require_relative 'strings_parser'
require_relative 'device_types'
@pingwinator
pingwinator / Apple iPad Pro Silver.png
Created March 27, 2019 08:40
frameit: temporally solution ipad pro 12.9 3rd gen
8950 4e47 0d0a 1a0a 0000 000d 4948 4452
0000 08e4 0000 0b8d 0806 0000 001f 6863
a000 0000 0173 5247 4200 aece 1ce9 0000
0009 7048 5973 0000 0b13 0000 0b13 0100
9a9c 1800 0004 2869 5458 7458 4d4c 3a63
6f6d 2e61 646f 6265 2e78 6d70 0000 0000
003c 783a 786d 706d 6574 6120 786d 6c6e
733a 783d 2261 646f 6265 3a6e 733a 6d65
7461 2f22 2078 3a78 6d70 746b 3d22 584d
5020 436f 7265 2035 2e34 2e30 223e 0a20
@pingwinator
pingwinator / PSPDFTableViewCell+LayoutMarginsGuide.m
Created January 2, 2019 12:51 — forked from douglashill/PSPDFTableViewCell+LayoutMarginsGuide.m
Alternative for a table view cell’s content view’s layoutMarginsGuide that works on iOS 10.
@implementation PSPDFTableViewCell // UITableViewCell subclass
/**
On iOS 10, constraints involving a UITableViewCell’s contentView’s layoutMarginsGuide are removed for some
reason before the cell appears, which breaks the layout. This layout guide is a working alternative.
*/
- (UILayoutGuide *)pspdf_layoutMarginsGuide {
if (@available(iOS 11.0, *)) {
return self.contentView.layoutMarginsGuide;
}
@pingwinator
pingwinator / README.md
Created August 1, 2018 11:25 — forked from blackjid/README.md
How configure your raspberry pi with dashing to have a awesome dashboard

Raspberry pi dashboard

This is what we did to setup a few dashboards at platanus

You'll need

  • Raspberry Pi
  • Dashing Service
  • Wifi stick (optional)
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
if [ "true" == ${ALREADYINVOKED:-false} ]
then
echo "RECURSION: Detected, stopping"
else
export ALREADYINVOKED="true"
@pingwinator
pingwinator / Singleton.h
Created February 2, 2017 17:58 — forked from virasio/Singleton.h
Singleton (Objective-C with ARC)
@interface MySingleton : NSObject
// ...
+ (instancetype) sharedInstance;
+ (instancetype) alloc __attribute__((unavailable("alloc not available, call sharedInstance instead")));
- (instancetype) init __attribute__((unavailable("init not available, call sharedInstance instead")));
+ (instancetype) new __attribute__((unavailable("new not available, call sharedInstance instead")));
@pingwinator
pingwinator / set_project_profiles.sh
Created June 23, 2016 09:22 — forked from tehnoir/set_project_profiles.sh
Update Xcode project's build settings to point to current provisioning profiles.
#!/bin/bash
##############################################################################################################
### 1. Name your profiles with the convention of ProjectName_TargetName_ConfigurationName.mobileprovision ###
### 2. Create a directory called CodeSign in your project directory ###
### 3. Move all your project's provisioning profiles into the CodeSign directory ###
### ###
### Running this script will update your project file to point to the correct UUIDs of each corresponding ###
### profile in your CodeSign directory. ###
##############################################################################################################
@pingwinator
pingwinator / instruction.md
Last active March 4, 2016 10:34 — forked from dev4dev/instruction.md
ClangFormat

Clang Formatter

  1. Install Alcatraz
  2. Install ClangFormat Plugin ClangFormat
  3. Restart Xcode
  4. Download .clang-format.yml to your home directory

curl -L -o ~/.clang-format https://gist.githubusercontent.com/dev4dev/78d0508304558e969b2a/raw/9bab5aefe2e29f4b7b6a5560642618e1e78b397c/.clang-format.yml 5. In Xcode select menu Edit -> Clang Format -> File to use rules from downloaded .clang-format.ylm file

// Android app
private void setupParse(Context context) {
Parse.initialize(this, <PARSE_APP_ID>, <PARSE_CLIENT_KEY>);
ParseInstallation.getCurrentInstallation().put("uniqueId", getWifiMacAddress(context));
ParseInstallation.getCurrentInstallation().saveInBackground();
}
private String getWifiMacAddress(Context context) {
WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
if (wifiManager != null && wifiManager.getConnectionInfo() != null) {
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
# Method behind this madness described: http://forums.macrumors.com/showthread.php?t=1409151&page=4
# See discussion in comments here: https://www.macupdate.com/app/mac/39654/lion-tweaks
# And here: http://forums.macrumors.com/showthread.php?t=1410459