Skip to content

Instantly share code, notes, and snippets.

View moosabaloch's full-sized avatar
🏢

Moosa Baloch moosabaloch

🏢
View GitHub Profile
@netgfx
netgfx / AudioPlayer.swift
Created February 23, 2018 21:26
A basic audio player with observers and extra features. Based on AVFoundation and AVQueuePlayer
//
// AudioPlayer.swift
//
// Created by MDobekidis
//
import Foundation
import AVFoundation
import UIKit
import Signals
@lewisjkl
lewisjkl / URLRequestSigner.swift
Last active January 3, 2024 08:32
aws4 request signing iOS Swift 3
// This is free and unencumbered software released into the public domain.
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.
// In jurisdictions that recognize copyright laws, the author or authors
// of this software dedicate any and all copyright interest in the
// software to the public domain. We make this dedication for the benefit
@michaelevensen
michaelevensen / PagingCollectionViewController.swift
Last active April 10, 2024 08:46
An example of perfectly paging horizontal UICollectionViewController with overflowing cells. Works great with Storyboard — no need to set any specific attributes, just add this Class to the Controller and set your desired size for the cells like you would normally.
import UIKit
private let reuseIdentifier = "Cell"
class CollectionViewController: UICollectionViewController {
/* Custom scrollView for paging */
let pagingScrollView = UIScrollView()
/* Return item size */
@tedmiston
tedmiston / nodejs-tcp-example.js
Last active September 20, 2024 07:39
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');