Skip to content

Instantly share code, notes, and snippets.

View BAProductions's full-sized avatar
💭
Making Test Build With Imported Repo

DJABHipHop BAProductions

💭
Making Test Build With Imported Repo
View GitHub Profile
@logtdm
logtdm / AppDelegate.swift
Created April 18, 2018 19:52
App to assist the caregivers of people with Alzheimer's Disease
//
// AppDelegate.swift
// Stream
//
// Created by Taylor Martin on 2017-11-18.
// Copyright © 2017 Taylor Martin. All rights reserved.
//
import UIKit
import Firebase
@budidino
budidino / string-truncate.swift
Last active April 3, 2024 20:11 — forked from vicc/string-truncate.swift
String truncate extension for Swift 4
extension String {
/*
Truncates the string to the specified length number of characters and appends an optional trailing string if longer.
- Parameter length: Desired maximum lengths of a string
- Parameter trailing: A 'String' that will be appended after the truncation.
- Returns: 'String' object.
*/
func trunc(length: Int, trailing: String = "…") -> String {
return (self.count > length) ? self.prefix(length) + trailing : self
@ttimasdf
ttimasdf / 00_MIGRATE_KEY.md
Last active August 22, 2023 15:30
Migrate your OTA key, step by step guide

Goal

Migrate from self-built (test-key or dev-key) or Official Release from https://download.lineageos.org/, to our self-signed builds, RETAINING DATA!!! and avoid the annoying error:

Can't install this package on top of incompatible data. Please try another package or run a factory reset

Usage

Apply the two patch accordingly, with command below. (Changed a little bit from 156047 and 162144

@Bigigrammer
Bigigrammer / ViewController.swift
Created April 16, 2017 06:30
Example of how to use CustomWKWebView.
import UIKit
import WebKit
class ViewController: UIViewController, CustomWKWebDelegate, WKNavigationDelegate, URLSessionDownloadDelegate {
var testWeb: CustomWKWebView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
@Bigigrammer
Bigigrammer / CustomWKWebView.swift
Last active April 4, 2023 11:11
Get url where web page icon.
//
// CustomWKWebView.swift
// WebPageTest
//
// Created by Daiki Ito on 2017/04/08.
// Copyright © 2017年 EAssistant. All rights reserved.
//
import UIKit
import WebKit
@alecordev
alecordev / gist:28bbca245865bb8aaf8b964ec72bcc72
Created March 19, 2017 15:13
Wordpress - Import uploaded files to media library
/*
* This function scans through all files in the wp-content/uploads
* folders and imports them into the media library. This should be
* included in your theme's functions.php file. Simply visit your
* website, including the URL param:
* http://www.example.org/?import_non_existing_media_library_entries=1
*
* Plan on it timing out a few times. Just keep refreshing. It won't
* duplicate files being imported.
*/
@jadar
jadar / SwiftMIDI.swift
Last active May 6, 2023 16:41
Swift class making use of AudioToolbox
//
// swift
// SwiftMIDI
//
// Created by Jacob Rhoda on 12/24/16.
// Copyright © 2016 Jadar. All rights reserved.
//
import Foundation
import CoreMIDI
@KentarouKanno
KentarouKanno / WKWebView.md
Last active March 30, 2023 17:24
WKWebView

WKWebView

import UIKit
import WebKit

class ViewController: UIViewController, WKNavigationDelegate {
    
    var wkWebView: WKWebView!
    let observerKeyName = ["estimatedProgress", "loading", "title", "URL", "hasOnlySecureContent", "canGoBack", "canGoForward"]
@cliss
cliss / RxUIWebViewDelegateProxy.swift
Created March 29, 2016 13:48
Reactive Extensions for UIWebView
//
// RxUIWebViewDelegateProxy.swift
//
// Created by Casey Liss on 24/3/16.
// Copyright © 2016 Casey Liss. All rights reserved.
//
import Foundation
import RxSwift
import RxCocoa
@mingsai
mingsai / MNGSoundManager.swift
Created February 12, 2016 17:45
A Swift class to manage initialization, playback and memory related to sound playback on iOS
//
// MNGSoundManager.swift
//
//
// Created by Tommie N. Carter, Jr., MBA on 10/26/15.
// Copyright © 2015 MING Technology. All rights reserved.
//
import Foundation
import AudioToolbox