This file contains 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 = { |
This file contains 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 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 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 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 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 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 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 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 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
/* | |
* pool_address - Pool address should be in the form "pool.supportxmr.com:3333". Only stratum pools are supported. | |
* wallet_address - Your wallet, or pool login. | |
* rig_id - Rig identifier for pool-side statistics (needs pool support). | |
* pool_password - Can be empty in most cases or "x". | |
* use_nicehash - Limit the nonce to 3 bytes as required by nicehash. | |
* use_tls - This option will make us connect using Transport Layer Security. | |
* tls_fingerprint - Server's SHA256 fingerprint. If this string is non-empty then we will check the server's cert against it. | |
* pool_weight - Pool weight is a number telling the miner how important the pool is. Miner will mine mostly at the pool |
NewerOlder