Install the following apps on your mac running macOS:
- (standalone) Xcode Command Line Tools
- Homebrew
- Git
Modified from: https://www.moncefbelyamani.com
import { useEffect, useState } from "react"; | |
type UseTextSelectionReturn = { | |
text: string; | |
rects: DOMRect[]; | |
ranges: Range[]; | |
selection: Selection | null; | |
}; | |
const getRangesFromSelection = (selection: Selection): Range[] => { |
/* | |
RUN THE SCRIPT BY YOURSELF: | |
- Run `node paddle-revenue.js` on your server and let it run 24/7. | |
- Access the API at http://your_server_ip:8175/ (JSON) | |
HOSTED VERSION: | |
If you don't want to run the script by your own, you can use the | |
hosted version. The price is $5 per month per Paddle account. | |
Here is how: |
// | |
// ContentView.swift | |
// ColorCodable | |
// | |
// Created by Mateo on 5/26/22. | |
// | |
import SwiftUI |
import SwiftUI | |
let width : CGFloat = 82.0 | |
let height : CGFloat = 82.0 | |
struct ContentView: View { | |
@State private var toggle = false | |
var body: some View { | |
VStack { | |
Spacer() | |
ZStack { | |
Image(systemName: "heart.fill") |
// | |
// Color+Codable.swift | |
// FirestoreCodableSamples | |
// | |
// Created by Peter Friese on 18.03.21. | |
// | |
import SwiftUI | |
// Inspired by https://cocoacasts.com/from-hex-to-uicolor-and-back-in-swift |
import Cocoa | |
extension UserDefaults { | |
func set(_ color: NSColor, forKey: String) { | |
if let data = try? NSKeyedArchiver.archivedData(withRootObject: color, requiringSecureCoding: false) { | |
self.set(data, forKey: forKey) | |
} | |
} | |
Install the following apps on your mac running macOS:
Modified from: https://www.moncefbelyamani.com
# Generate the private and public keys | |
openssl ecparam -name secp256k1 -genkey -noout | openssl ec -text -noout > key | |
# Extract the public key and remove the EC prefix 0x04 | |
cat key | grep pub -A 5 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^04//' > pub | |
# Extract the private key and remove the leading zero byte | |
cat key | grep priv -A 3 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^00//' > priv | |
# Generate the hash and take the address part |
/** | |
* Code written by P. Gajland | |
* https://github.com/GaPhil | |
* | |
* IMPORTANT: | |
* This code is for educational and demonstrative purpose only. | |
* If you need to do serious encryption for "production" it is | |
* recommended to investigate more traditional libraries and | |
* gain some specific knowledge on cryptography and security. | |
*/ |