Skip to content

Instantly share code, notes, and snippets.

View mezhevikin's full-sized avatar
:octocat:

Mezhevikin Alexey mezhevikin

:octocat:
View GitHub Profile
@levochkaa
levochkaa / PublishedAppStorage.swift
Last active October 10, 2023 16:00
@PublishedAppStorage
// PublishedAppStorage.swift
import Combine
import SwiftUI
@propertyWrapper
struct PublishedAppStorage<Value> {
@UserDefault private var storedValue: Value
private var publisher: Publisher?
@dotkebi
dotkebi / NSData+AES.swift
Last active June 12, 2023 08:59
Swift AES Extensions
import Foundation
extension NSData {
func encryptAES128(key: NSString, iv: NSString) -> NSData? {
return aes128(method: CCOperation(kCCEncrypt), key: key, iv: iv)
}
func decryptAES128(key: NSString, iv: NSString) -> NSData? {
return aes128(method: CCOperation(kCCDecrypt), key: key, iv: iv)
@tinyhappysteps
tinyhappysteps / ViewController.swift
Created September 17, 2015 16:40
Swift Resume Audio AVFoundation - AVQueuePlayer AVPlayer
import UIKit
import AVFoundation
var player: AVQueuePlayer!
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
@JamieMason
JamieMason / unfollow.js.md
Last active November 5, 2024 21:42
Unfollow everyone on twitter.com

Unfollow everyone on twitter.com

  1. Go to https://twitter.com/YOUR_USER_NAME/following
  2. Open the Developer Console. (COMMAND+ALT+I on Mac)
  3. Paste this into the Developer Console and run it
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//