Skip to content

Instantly share code, notes, and snippets.

View Nickolans's full-sized avatar
:octocat:
Interesting...

Nick Griffith Nickolans

:octocat:
Interesting...
View GitHub Profile
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active October 29, 2025 18:06
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

func encode<T>(var value: T) -> NSData {
return withUnsafePointer(&value) { p in
NSData(bytes: p, length: sizeofValue(value))
}
}
func decode<T>(data: NSData) -> T {
let pointer = UnsafeMutablePointer<T>.alloc(sizeof(T.Type))
data.getBytes(pointer)
@brayden-morris-303
brayden-morris-303 / CoreBluetooth.md
Last active February 18, 2023 04:53
Overview of Bluetooth Low Energy (BLE) and CoreBluetooth

CoreBluetooth and BLE

Bluetooth Low Energy (BLE)

Various Names:

  • Bluetooth Low Energy
  • BLE
  • BTLE