- Catalina
- Big Sur
- Monterey
- Ventura
- Sonoma
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SwiftUI | |
import UIKit | |
struct DocumentPicker: UIViewControllerRepresentable { | |
@Binding var filePath: URL? | |
func makeCoordinator() -> DocumentPicker.Coordinator { | |
return DocumentPicker.Coordinator(parent1: self) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
DOMAIN_NAME=$1 | |
openssl req \ | |
-newkey rsa:2048 \ | |
-x509 \ | |
-nodes \ |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
# default gems here | |
#--------------------------- | |
# add paperclip and bootstrap | |
gem "paperclip", "~> 4.1" | |
gem 'bootstrap-sass', '~> 3.1.1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.new_photo = function(req, res){ | |
// Get File upload information | |
var filename = req.files.image.filename; // actual filename of file | |
var path = req.files.image.path; //will be put into a temp directory | |
var mimeType = req.files.image.type; // image/jpeg or actual mime type | |
// Create a new blog post | |
var photoPost = new Photo(); // create Blog object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// flightplan.js | |
var plan = require('flightplan'); | |
/** | |
* Remote configuration for "production" | |
*/ | |
plan.target('production', { | |
host: 'example.com', | |
username: 'someuser', | |
password: 'somepassword', |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');
Those suck for maintenance and they're ugly.
NewerOlder