Skip to content

Instantly share code, notes, and snippets.

View digitallysavvy's full-sized avatar
🐼

Hermes digitallysavvy

🐼
View GitHub Profile
@snowzurfer
snowzurfer / 3DPointsFromDepth.swift
Last active July 12, 2024 07:39
3D world points from ARKit depth
import ARKit
import SceneKit
let horizontalPoints = 256 / 2
let verticalPoints = 192 / 2
var depthNodes = [SCNNode]()
var parentDebugNodes = SCNNode()
var sceneView: ARSCNView!
// Somewhere during setup
@digitallysavvy
digitallysavvy / ARViewController.swift
Last active December 1, 2019 06:04
A simple ARSCN View Controller with full render delegate list.
//
// ARViewController.swift
//
// Created by digitallysavvy.
// Copyright © 2019 digitallysavvy All rights reserved.
//
import UIKit
import ARKit
@primaryobjects
primaryobjects / m3u8.md
Last active July 20, 2024 13:07
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
import UIKit
typealias DownloadCompletionBlock = (UIImage?) -> Void
class AsyncImageView: UIImageView {
/// Returns the cached image or nil if connection fails.
var completionHandler:((UIImage?)->Void)?
/// Sets the cache policy for the image download request. Default values is .returnCacheDataElseLoad.
@sukima
sukima / XORCipher.js
Last active July 18, 2024 14:52
A Super simple encryption cipher using XOR and Base64 in JavaScript
// XORCipher - Super simple encryption using XOR and Base64
//
// Depends on [Underscore](http://underscorejs.org/).
//
// As a warning, this is **not** a secure encryption algorythm. It uses a very
// simplistic keystore and will be easy to crack.
//
// The Base64 algorythm is a modification of the one used in phpjs.org
// * http://phpjs.org/functions/base64_encode/
// * http://phpjs.org/functions/base64_decode/
@zetachang
zetachang / gist:4111314
Created November 19, 2012 15:37
Instruction on adding a Acknowledgements Settings.bundle
  • To add Settings.bundle in Xcode. Command N and in Resource, choose Settings Bundle .
  • Open Root.plist in source code, paste the code below to replace it,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>PreferenceSpecifiers</key>