Skip to content

Instantly share code, notes, and snippets.

View joncardasis's full-sized avatar
Hold on a sec. My pour over is on its second bloom.

Jon Cardasis joncardasis

Hold on a sec. My pour over is on its second bloom.
View GitHub Profile
@PillowUnicorn
PillowUnicorn / ios-bitrise.yml
Created April 28, 2017 22:29
Pillow's iOS bitrise.yml
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- BITRISE_PROJECT_PATH: ios/pro_mobile.xcodeproj
opts:
is_expand: false
- BITRISE_SCHEME: pro_mobile
opts:
@joncardasis
joncardasis / obtain_public_key.md
Created August 10, 2017 19:55
Obtain Public Key from iOS .mobileprovision profile
  1. Install homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
  1. Install XMLStarlet for xml parsing:
brew install xmlstarlet
@Bashta
Bashta / SnappCameraView.swift
Last active June 28, 2019 15:08
Basic implementation of camera scanner for rectangles.
//
// SnappCameraView.swift
// EdgeDetection
//
// Created by er on 11/4/17.
// Copyright (c) 2017 Erison Veshi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
@joncardasis
joncardasis / DebugLogger.swift
Last active November 27, 2024 05:58
Reroute print and NSLogs to BOTH Xcode console and a file url [Swift + ObjC Solutions]
//
// DebugLogger.swift
//
// Created by Jonathan Cardasis. on 1/1/18.
// Copyright ©2018 Jonathan Cardasis. All rights reserved.
//
#if DEBUG
import Foundation
@joncardasis
joncardasis / FVPasswordManager.py
Created May 3, 2018 20:17
A python script to check if a FileVault password has ever been used on macOS before.
import os, sys
import re
import base64
import hashlib
import plistlib
from binascii import unhexlify
class FVPasswordManager(object):
PL_SALTED_HASH_ARRAY_KEY = 'SALTED-SHA512-PBKDF2'
@atereshkov
atereshkov / podspec-example
Last active April 29, 2023 16:11
Xcode 10 Fat framework - How to create universal binary iOS framework (+ Cocoapods podspec)
If you've got something like this:
file was built for arm64 which is not the architecture being linked (x86_64):
Than this gist is for you.
Let's say you have already developed the framework itself and just want to build the binary
and distribute it through the Cocoapods.
1. Make sure your framework "Deployment Target" is equal to all the dependencies from your podspec file.
@pcmaffey
pcmaffey / Code.gs
Last active September 19, 2023 15:56
Roll your own analytics - Google Apps Script for writing custom analytics to Google Sheets
// original from: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
// original gist: https://gist.github.com/willpatera/ee41ae374d3c9839c2d6
// NOTE: Uses es5 javascript
// handle method: get
function doGet(e){
return handleResponse(e);
}
// handles method: post
function doPost(e){
@joncardasis
joncardasis / optimizeImage.sh
Created April 5, 2019 20:28
Compresses and optimizes png image sizes for a given file or directory via pngquant.
#!/bin/bash
# Compresses and optimizes png image sizes for a given file or directory.
# @author: Jonathan Cardasis
CHECK_MARK="\033[0;32m\xE2\x9C\x94\033[0m"
PNGQUANT_BINARY_URL="https://pngquant.org/pngquant.tar.bz2"
optimize() {
ORIGINAL_PATH="$1"
NEW_PATH="$ORIGINAL_PATH.new"
@mbret
mbret / metro.config.js
Last active October 1, 2019 16:06
Symlink for React Native 0.59 (symlink + scoped package + hast name collision)
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
const {
getSymLinkedModules,
getBlacklistedModulesForAlternateRoot,
getExtraModulesForAlternateRoot,
@efrapp
efrapp / howto-setup-sidekiq-on-heroku.md
Last active October 30, 2024 19:54
Steps to setup Sidekiq on Heroku

Setup Sidekiq for Heroku

Install Heroku Redis Add-on

Option 1: Using the dashboard

Go to the Resources tab and in the Add-ons section type Heroku Redis in the search field. It will appear in the search list. Click on it and a modal will show up to install it, click in the Provision button to start the installation.