I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
import SwiftUI | |
extension View { | |
/// https://stackoverflow.com/a/61985678/3393964 | |
public func cursor(_ cursor: NSCursor) -> some View { | |
self.onHover { inside in | |
if inside { | |
cursor.push() | |
} else { | |
NSCursor.pop() |
#!/usr/bin/env PYTHONIOENCODING="utf-8" python | |
""" | |
A simple neural network learning the XOR function | |
""" | |
import tensorflow as tf | |
sess = tf.InteractiveSession() | |
# Desired input output mapping of XOR function: | |
x_ = [[0, 0], [0, 1], [1, 0], [1, 1]] # input | |
#labels=[0, 1, 1, 0] # output => |
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
#!/bin/bash | |
# Script written by Tony Piazza (https://gist.github.com/tonypiazza) | |
# Privileges check | |
if [ $UID != 0 ] | |
then | |
echo -e "Insufficient privileges!" | |
exit 1 | |
fi |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
#!/usr/bin/env python | |
"""MailBox class for processing IMAP email. | |
(To use with Gmail: enable IMAP access in your Google account settings) | |
usage with GMail: | |
import mailbox |
Here is what you need to do to register your app for a custom URL scheme (for the example we will use a "myapp" scheme). | |
1) In your Info.plist, add a new entry for CFBundleURLTypes: <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLName</key> <string>MyApp's URL</string> <key>CFBundleURLSchemes</key> <array> <string>myapp</string> </array> </dict> </array> | |
2) Somewhere in your application's startup code (e.g. init), add this code: - (void)registerMyApp { [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(getUrl:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; } | |
- (void)getUrl:(NSAppleEventDescriptor )event withReplyEvent:(NSAppleEventDescriptor )replyEvent { NSString url = [[event paramDescriptorForKeyword:keyDirectObject] stringValue]; // Now you can parse the URL and perform whatever action is needed } | |
Related Tidbits: |
+ (NSString *)timeIntervalToStringWithInterval:(NSTimeInterval)interval | |
{ | |
NSString *retVal = @"At time of event"; | |
if (interval == 0) return retVal; | |
int second = 1; | |
int minute = second*60; | |
int hour = minute*60; | |
int day = hour*24; | |
// interval can be before (negative) or after (positive) |
var bind = function (prev, bridge) { | |
return function (input) { | |
var result = prev(input); | |
return result.length === 0 ? result : bridge(result[0])(result[1]); | |
}; | |
}; | |
var result = function (a) { | |
return function (input) { | |
return [a, input]; |