Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Josscii's full-sized avatar
💭
??

Josscii Josscii

💭
??
View GitHub Profile
@saitjr
saitjr / symbolicatecrash
Last active August 17, 2022 11:28
Advance version of symbolicatecrash
#!/usr/bin/perl -w
#
# This script parses a crashdump file and attempts to resolve addresses into function names.
#
# It finds symbol-rich binaries by:
# a) searching in Spotlight to find .dSYM files by UUID, then finding the executable from there.
# That finds the symbols for binaries that a developer has built with "DWARF with dSYM File".
# b) searching in various SDK directories.
#
# Copyright (c) 2008-2015 Apple Inc. All Rights Reserved.
@kean
kean / AutoRetry.swift
Last active September 20, 2023 20:21
Smart Auto Retry using RxSwift
// The MIT License (MIT)
//
// Copyright (c) 2017 Alexander Grebenyuk (github.com/kean).
import Foundation
import RxSwift
import RxCocoa
extension ObservableType {
@hirohitokato
hirohitokato / ArrayExtension.swift
Last active March 12, 2024 12:02
Get downsampled array from original data, using vDSP. For only Float array.
extension Array where Element == Float {
// @see: HOW TO CREATE A SOUNDCLOUD LIKE WAVEFORM IN SWIFT 3
// (https://miguelsaldana.me/2017/03/13/how-to-create-a-soundcloud-like-waveform-in-swift-3/)
func downSampled(binSize: Int, multiplier: Float = 1.0) -> [Float] {
let count = self.count
var processingBuffer = [Float](repeating: 0.0,
count: Int(count))
let sampleCount = vDSP_Length(count)
@rproenca
rproenca / Clipboard.js
Last active April 10, 2024 05:33
Copy text to clipboard using Javascript. It works on Safari (iOS) and other browsers.
window.Clipboard = (function(window, document, navigator) {
var textArea,
copy;
function isOS() {
return navigator.userAgent.match(/ipad|iphone/i);
}
function createTextArea(text) {
textArea = document.createElement('textArea');
@tad-iizuka
tad-iizuka / ViewController.swift
Created October 13, 2017 02:39
MP3 Recording with lame and AVAudioEngine, Swift 4
//
// ViewController.swift
// MP3RecordingSample
//
// Created by Tadashi on 2017/10/13.
// Copyright © 2017 UBUNIFU Inc. All rights reserved.
//
import UIKit
import AVFoundation
import AudioToolbox
@lattner
lattner / TaskConcurrencyManifesto.md
Last active April 21, 2024 09:43
Swift Concurrency Manifesto
//
// MKMapView+ZoomLevel.swift
// Monizze
//
// Created by Dylan Gyesbreghs on 23/06/2017.
// Copyright © 2017 DGyesbreghs. All rights reserved.
// https://oleb.net/blog/2010/05/set-the-zoom-level-of-mkmapview/
//
import MapKit
@wattnpapa
wattnpapa / MKMapViewZoomLevel.swift
Created May 10, 2017 13:21
MKMapViewZoomLevel.swift
//
// MKMapViewZoomLevel.swift
//
// Created by Johannes Rudolph on 10.05.17.
// Based on http://troybrant.net/blog/2010/01/set-the-zoom-level-of-an-mkmapview/
//
import Foundation
import MapKit
@lexrus
lexrus / CollectionOperator.swift
Created April 24, 2017 08:53
Avoid hard-coded KVC collection operators
import Foundation
enum CollectionOperator: String {
case avg
case count
case max
case min
case sum
//
// ContextLabel.swift
// ContextLabel
//
// Created by Cory D. Wiles
// Copyright (c) 2017 Cory D. Wiles. All rights reserved.
//
import Foundation
import UIKit