Skip to content

Instantly share code, notes, and snippets.

View xremix's full-sized avatar
👨‍💻

Toni Hoffmann xremix

👨‍💻
View GitHub Profile
@xremix
xremix / repair-disk.sh
Created December 13, 2017 09:45
Tries to Remount Disk if disk not showing up on macOS
diskutil list
read -p "Which drive do you want to repair? " answer
echo $answer
diskutil unmount $answer
diskutil unmountDisk $answer
diskutil mountDisk $answer
diskutil mount $answer
@xremix
xremix / SwiftCheatSheet.md
Last active March 15, 2018 14:30
Swift Cheat Sheet

Deprecated, new version is published here: https://github.com/xremix/Personal-Cheatsheet-Collection/

Swift Cheat Sheet

Cheat Sheet for iOS Development using Swift, containing a couple of code samples that are interesting to know and remember when needed. Mostly interesting are longer code samples at the bottom.

Debug in Live Console

(lldb) po [myItem.myProperty]
@xremix
xremix / binarysearch.html
Last active November 23, 2017 08:33
Binary Search JS
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript">
'use strict';
var data = [];
for (var i = 0; i < 999999; i++) {
data.push(i);
@xremix
xremix / most_occurrence.js
Last active September 25, 2017 13:22
Find item with most occurrence (JS)
// -----------------------------
// -----------------------------
// -----------------------------
// Most Occurence Item in Array
// This is just for playing arround.
// -----------------------------
// -----------------------------
// -----------------------------
@xremix
xremix / cf-stack-trace.cfc
Created August 25, 2017 06:57
Coldfusion / CF Stack Trace
<cfscript>
//https://www.bennadel.com/blog/2346-coldfusion-10---accessing-the-call-stack-with-callstackget.htm
writeDump( var = callstackGet(), label = "Call Stack" );
</cfscript>
<?PHP
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
?>
@xremix
xremix / RoundButton.swift
Last active March 21, 2017 12:09
Swift Round Button with animation
//
// RoundButton.swift
// Toni Hoffmann
//
// Created by Toni Hoffmann on 09.12.16.
// Copyright © 2016 Toni Hoffmann. All rights reserved.
//
// This was created in regards of an Exif Remover App, build with Swift for iPhone
//
import UIKit
@xremix
xremix / UIViewController-Playground.swift
Last active November 29, 2016 12:32
UIViewController Playground for Swift 3.0
//Big thanks to Pretz
import UIKit
let vc = UIViewController()
vc.view.backgroundColor = .white
vc.navigationItem.title = "This is a view controller"
let searchController = UISearchController(searchResultsController: nil)