Skip to content

Instantly share code, notes, and snippets.

@rabzu
rabzu / NSManagedObject.swift
Last active March 9, 2016 13:31 — forked from vl4dimir/ExtendedManagedObject.h
Swift Version of NSManagedObject_to_Dictionary Extension:
//
// NSManagedObject.swift Extension
// Transfroms CoreData NSManageObject into Swift Dictionary
// The resulting dictionary can be then used for serialization and copying
//
// Created by rabzu on 25/11/2014.
// Copyright (c) 2014 WeshApp. All rights reserved.
//
import Foundation
@abeldomingues
abeldomingues / FileConverter.swift
Last active May 7, 2017 15:57
A Swift adaptation of Chris Adamson's Objective-C code for exporting iPod Library audio tracks (obtained as AVAssets using an MPMediaPickerController) to LPCM. See http://www.subfurther.com/blog/2010/12/13/from-ipod-library-to-pcm-samples-in-far-fewer-steps-than-were-previously-necessary/ for Chris' original post.
import UIKit
import AVFoundation
protocol FileConverterDelegate {
func fileConversionCompleted()
}
class FileConverter : NSObject {
var delegate : FileConverterDelegate?
@joanbono
joanbono / macdown_brute.sh
Last active January 7, 2024 11:12
mac-torrent-download DMG brute-forcer
#!/bin/bash
# Title: Macdown.sh
# Description: Bruteforce DMG files downloaded from mac-torrent-download.net
# Author: Joan Bono (@joan_bono)
# Version: 1.1.0
# Last Modified: jbono @ 20211129
RED='\033[0;31m'
GREEN='\033[0;32m'
NOCOLOR='\033[0m'
@chockenberry
chockenberry / ql.sh
Last active March 4, 2024 23:40
QuickLook for macOS shell
#!/bin/sh
# usage:
# ql /tmp/file.jpg
# cat /tmp/file.jpg | ql
# cal -h | ql
if [ -z "$*" ]; then
cat > /tmp/ql.stdin
mime_type=$(file --brief --mime-type /tmp/ql.stdin)