Skip to content

Instantly share code, notes, and snippets.

View colemancda's full-sized avatar
🏎️
Working with Swift on ARM

Alsey Coleman Miller colemancda

🏎️
Working with Swift on ARM
View GitHub Profile
class ArrayImpl<T> {
var space: Int
var count: Int
var ptr: UnsafeMutablePointer<T>
init(count: Int = 0, ptr: UnsafeMutablePointer<T> = nil) {
self.count = count
self.space = count
@CodaFi
CodaFi / alltheflags.md
Last active June 2, 2024 17:09
Every Option and Flag /swift (1.2) Accepts Ever

#Every Single Option Under The Sun

  • optimization level options
  • automatic crashing options
  • debug info options
  • swift internal options
  • swift debug/development internal options
  • linker-specific options
  • mode options
@mackuba
mackuba / wwdc15.md
Last active August 6, 2022 17:28
New stuff from WWDC 2015

Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.

If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them: https://github.com/insidegui/WWDC.

OS X El Capitan

http://www.apple.com/osx/elcapitan-preview/

  • split view - two apps side by side on full screen
@diamondo25
diamondo25 / main.go
Last active December 13, 2022 09:15
Golang TinyMapleServer
package main
import (
"bufio"
"bytes"
"encoding/binary"
"encoding/hex"
"flag"
"fmt"
"net"
import Foundation
extension UIDevice {
/**
Try to get the username from the device name using common knows
default device names format.
- copyright: Owen Godfrey on [StackOverflow](http://stackoverflow.com/questions/8261961/better-way-to-get-the-users-name-from-device)
- remark: Original regexpr improved to support custom name with model included eg. `<username>'s iPhone 6S`
@gabonator
gabonator / camera.md
Created June 4, 2016 13:48
Cheap chinese IP camera with H264 encoding based on Hisilicon 8M (Hi3518E) chip

Cheap chinese IP camera with H264 encoding based on Hisilicon 8M (Hi3518E) chip

Video stream url for VLC/DVR:

  • rtsp://192.168.1.93:554/user=admin&password=&channel=&stream=.sdp?real_stream--rtp-caching=100

Telnet access

  • telnet 192.168.1.10 23
  • Localhost login: root
  • Password: xmhdipc
@colemancda
colemancda / SunXi.swift
Created June 7, 2016 05:25
SunXi Extensions for SwiftyGPIO
//
// SunXi.swift
//
//
// Created by Alsey Coleman Miller on 6/7/16.
// Copyright © 2016 ColemanCDA. All rights reserved.
//
public struct SunXiGPIO: CustomStringConvertible, Equatable {
@colemancda
colemancda / IoTLima-14-08-206.swift
Last active August 13, 2016 20:06
IoT, BLE, Swift y Linux Workshop
let title = "IoT, BLE, Swift y Linux"
// When
let date = "August 13th, 2016"
let city = "Lima, Peru"
let location = "Laboratoria Perú"
// Duration
let hours = 8
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"
@NicholasTD07
NicholasTD07 / codecov-with-spm.md
Created May 10, 2017 23:29
Generate code coverage report with Swift Package Manager

Set up

gem install xcov # required | might need sudo
gem install fastlane # optional | might also need sudo

Generate code coverage report