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
| [Unit] | |
| Description=XMR STAK Daemon | |
| After=network.target | |
| [Service] | |
| Type=forking | |
| GuessMainPID=no | |
| ExecStart=/usr/local/bin/xmr-stak -c /home/miner/config/config.txt -C /home/miner/config/pools.txt --cpu /home/miner/config/cpu.txt | |
| Restart=always | |
| User=miner |
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
| extension Date { | |
| func timeAgoDisplay() -> String { | |
| let calendar = Calendar.current | |
| let minuteAgo = calendar.date(byAdding: .minute, value: -1, to: Date())! | |
| let hourAgo = calendar.date(byAdding: .hour, value: -1, to: Date())! | |
| let dayAgo = calendar.date(byAdding: .day, value: -1, to: Date())! | |
| let weekAgo = calendar.date(byAdding: .day, value: -7, to: Date())! | |
| if minuteAgo < 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
| let cancelButtonAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white] | |
| UIBarButtonItem.appearance(whenContainedInInstancesOf: [UISearchBar.self]).setTitleTextAttributes(cancelButtonAttributes, for: .normal) |
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
| extension MyAwesomeViewController: MessagesDisplayDelegate { | |
| // ... | |
| func enabledDetectors(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> [DetectorType] { | |
| return [.hashtag, .custom(try! NSRegularExpression(pattern: "@[a-zA-Z0-9]{4,}", options: [])) ] | |
| } | |
| // ... |
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
| extension MyAwesomeViewController: MessagesDisplayDelegate { | |
| // ... | |
| func detectorAttributes(for detector: DetectorType, and message: MessageType, at indexPath: IndexPath) -> [NSAttributedString.Key: Any] { | |
| switch detector { | |
| case .hashtag: | |
| return [.foregroundColor: UIColor.white] | |
| case .custom: | |
| return [.foregroundColor: UIColor.black] |
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
| version: 2.1 | |
| parameters: | |
| # By default we enable the main workflow | |
| trigger: | |
| type: boolean | |
| default: true | |
| # Add a boolean parameter on each package. | |
| core: |
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
| workflows: | |
| version: 2 | |
| # The main workflow will trigger other workflow based on your changes | |
| trigger: | |
| when: << pipeline.parameters.trigger >> | |
| jobs: | |
| - trigger-workflows | |
| - new_version: | |
| requires: |
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
| jobs: | |
| trigger-workflows: | |
| executor: node | |
| steps: | |
| - run: | |
| name: Trigger workflows | |
| command: node ./circleci.js |
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
| const fetch = require('node-fetch'); | |
| const { exec } = require('child_process'); | |
| const modules = ['core', 'components']; | |
| exec('npx lerna changed --all', (error, stdout) => { | |
| modules.forEach(name => { | |
| if (!stdout.includes(name)) return; | |
| const params = { |
OlderNewer