- Install and download the free Scriptable app on your iOS device.
- Inside the app, press the "Plus" icon to create a new script
- Paste the content of the JS file into the script
- Place a Scriptable widget on your home screen
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
<?php | |
require_once 'vendor/autoload.php'; | |
use Jose\Factory\JWKFactory; | |
use Jose\Factory\JWSFactory; | |
$key_file = 'key.p8'; | |
$secret = null; // If the key is encrypted, the secret must be set in this variable | |
$private_key = JWKFactory::createFromKeyFile($key_file, $secret, [ |
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
pragma solidity 0.6.12; | |
import '@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol'; | |
import '@pancakeswap/pancake-swap-lib/contracts/token/BEP20/IBEP20.sol'; | |
import '@pancakeswap/pancake-swap-lib/contracts/token/BEP20/SafeBEP20.sol'; | |
import '@pancakeswap/pancake-swap-lib/contracts/access/Ownable.sol'; | |
// import "@nomiclabs/buidler/console.sol"; | |
interface IWBNB { |
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
pragma solidity ^0.4.24; | |
//Safe Math Interface | |
contract SafeMath { | |
function safeAdd(uint a, uint b) public pure returns (uint c) { | |
c = a + b; | |
require(c >= a); | |
} |
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
//A sequence is a list of values that you can step through one at a time. | |
//The most common way to iterate over the elements of a sequence is to use a for-in loop: | |
/* | |
Potentially our database could contain a large set of records, | |
and for each model we need to hit the disk to actually load its data, | |
so we don’t want to load everything at once. | |
To make this happen, we’re going to replace the array return type with our own custom sequence. | |
*/ | |
//https://www.swiftbysundell.com/articles/swift-sequences-the-art-of-being-lazy/ |
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
// The SwiftUI Lab | |
// Website: https://swiftui-lab.com | |
// Article: https://swiftui-lab.com/alignment-guides | |
import SwiftUI | |
class Model: ObservableObject { | |
@Published var minimumContainer = true | |
@Published var extendedTouchBar = false | |
@Published var twoPhases = true |
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
// The SwiftUI Lab | |
// Website: https://swiftui-lab.com | |
// Article: https://swiftui-lab.com/alignment-guides | |
import SwiftUI | |
class Model: ObservableObject { | |
@Published var minimumContainer = true | |
@Published var extendedTouchBar = false | |
@Published var twoPhases = true |
This is the quickest way I've found to kill all tmux sessions
# detach from each session
<prefix>d
# kill tmux and all sessions
tmux kill-server
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
// | |
// BottomSheetView.swift | |
// | |
// Created by Majid Jabrayilov | |
// Copyright © 2019 Majid Jabrayilov. All rights reserved. | |
// | |
import SwiftUI | |
fileprivate enum Constants { | |
static let radius: CGFloat = 16 |
NewerOlder