https://code-boxx.com/simple-pwa-example/
Copyright by Code Boxx
https://code-boxx.com/simple-pwa-example/
Copyright by Code Boxx
# An enhanced .zshrc for macOS | |
# | |
# ===================================== | |
# MAKE THE TERMINAL LOOK MORE COLORFUL | |
# ===================================== | |
# Load the colors functionality into zsh. Go here to learn more about colors: https://unix.stackexchange.com/questions/19498/understanding-colors-in-zsh | |
autoload -Uz colors && colors #Want to know about autoload go here: https://stackoverflow.com/questions/30840651/what-does-autoload-do-in-zsh | |
# set a fancy prompt (non-color, unless we know we "want" color) |
// | |
// AttachmentHandler.swift | |
// AttachmentHandler | |
// | |
// Created by Deepak on 25/01/18. | |
// Copyright © 2018 Deepak. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
// | |
// ViewController.swift | |
// CameraFilter | |
// | |
import UIKit | |
import AVFoundation | |
class ViewController: UIViewController, AVCaptureVideoDataOutputSampleBufferDelegate { | |
This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets.
Newer versions of openssl are stricter about certificate purposes. Use extensions accordingly.
Generate a Certificate Authority:
This is the implementation of Stopwatch class. | |
Usage: | |
1. Add the Stopwatch.swift file to the project | |
2. Create instance and assing the callback function | |
let stopwatch = Stopwatch() | |
stopwatch.callback = self.tick | |
3. Implement the callback function |
// Copyright (c) 2017 Kristopher Johnson | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a | |
// copy of this software and associated documentation files (the | |
// "Software"), to deal in the Software without restriction, including | |
// without limitation the rights to use, copy, modify, merge, publish, | |
// distribute, sublicense, and/or sell copies of the Software, and to | |
// permit persons to whom the Software is furnished to do so, subject to | |
// the following conditions: | |
// |
// Example Hammer 1.x code: | |
var body = document.getElementsByTagName('body')[0]; | |
var armAndHammer = new Hammer(body, options); | |
armAndHammerr.on('tap', tapEvent(ev)); | |
function tapEvent (ev) { | |
var touchEl; // dom element which you want to act on | |
if (ev.target === tocuhEl) { | |
handleTapEvent(); // what you actally want to do on tap |
/* | |
var t = Timer() | |
t.start() | |
// do something | |
t.stop() | |
print("took \(t.seconds)") | |
*/ |