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
| # Example how you can "patch" Matodon running in docker swarm by exploiting "config mounts" | |
| # to avoid mounting files from local system | |
| services: | |
| web: | |
| # original configuration | |
| # ... | |
| configs: | |
| - source: mastodon-remove-char-limit | |
| target: /mastodon/config/initializers/4_char_limit.rb |
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
| brew install meson dtc swig |
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
| sidekiq: | |
| image: tootsuite/mastodon:latest | |
| restart: always | |
| env_file: /opt/mastodon/.env.production | |
| environment: | |
| - DB_POOL=16 | |
| command: bundle exec sidekiq -c 16 -q pull | |
| depends_on: | |
| - db | |
| - redis |
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
| alias apropos "$__fish_config_dir/patches/apropos.patched" |
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
| TFT_eSPI screen = TFT_eSPI(); | |
| setup_t screenSetup; | |
| screen.init(); | |
| screen.getSetup(screenSetup); | |
| ESP_LOGI(TAG, "Version: %s", screenSetup.version.c_str()); | |
| ESP_LOGI(TAG, "Transaction: %i | Serial: %i", screenSetup.trans, screenSetup.serial); | |
| ESP_LOGI(TAG, "SPI overlap: %i | ESP: %x", screenSetup.overlap, screenSetup.esp); | |
| ESP_LOGI(TAG, "SPI Read fq %i | SPI fq: %i", screenSetup.tft_rd_freq, screenSetup.tft_spi_freq); |
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
| mongoose.connect('mongodb://localhost:27017/myapp', { useNewUrlParser: true }) | |
| const modelSchema = new Schema( | |
| { | |
| entity: String, | |
| scope: Number, | |
| actionType: Number | |
| }, | |
| { versionKey: false } | |
| ) | |
| const Test = mongoose.model('Test', modelSchema) |
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
| server { | |
| listen 80; | |
| server_name alexmak.net alexmak.yopp.in www.alexmak.net; | |
| access_log /var/log/nginx/alexmak-ssl-access.log; | |
| error_log /var/log/nginx/alexmak-ssl-error.log; | |
| rewrite ^(.*)$ https://alexmak.net$1 permanent; | |
| } | |
| 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
| require "matrix" | |
| require "time" | |
| class Array | |
| def middle | |
| if count < 3 | |
| return self | |
| end | |
| from = (count / 4.0).round.to_i |
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
| require 'benchmark/ips' | |
| require "matrix" | |
| require "time" | |
| class Kalman | |
| attr_accessor :state | |
| attr_accessor :process_noise | |
| attr_reader :control | |
| attr_accessor :model | |
| attr_reader :readings |
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
| 00:00:00.50,244.97 | |
| 00:00:00.142,244.90 | |
| 00:00:00.234,245.03 | |
| 00:00:00.327,244.21 | |
| 00:00:00.419,245.10 | |
| 00:00:00.512,244.76 | |
| 00:00:00.604,245.10 | |
| 00:00:00.696,245.03 | |
| 00:00:00.789,244.55 | |
| 00:00:00.881,244.62 |
NewerOlder