If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.
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
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
# Lives in .kamal/update | |
require "json" | |
require "net/http" | |
require "uri" | |
require "yaml" |
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
grafana: | |
image: grafana/grafana-enterprise:10.4.4-ubuntu | |
host: web | |
port: "3030:3000" | |
env: | |
clear: | |
GF_SERVER_ROOT_URL: your_url | |
GF_INSTALL_PLUGINS: grafana-clock-panel,redis-datasource,yesoreyeram-infinity-datasource | |
labels: | |
traefik.http.routers.grafana.rule: Host(`grafana.sumiu.link`) || (Host(`grafana-api.sumiu.link`) && PathPrefix(`/api`)) |
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
#!/bin/bash | |
find . \( -iname '*.rb' -o -iname '*.jb' -o -iname '*.erb' -o -iname '*.rake' \) -not -path "./spec/*" -not -path "./db/*" -exec wc -l {} + | sort -n |
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
kubectl get pods --show-all=true | grep Evicted | awk '{print $1}' | xargs kubectl delete pod |
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
class API::V1::BaseController < ApplicationController | |
skip_before_filter :verify_authenticity_token | |
before_filter :cors_preflight_check | |
after_filter :cors_set_access_control_headers | |
def cors_set_access_control_headers | |
headers['Access-Control-Allow-Origin'] = '*' | |
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS' |
I hereby claim:
- I am luizkowalski on github.
- I am luizkowalski (https://keybase.io/luizkowalski) on keybase.
- I have a public key whose fingerprint is A435 CA7D 4469 2F6A CD41 BA80 2294 EF90 7412 EC21
To claim this, I am signing this object:
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 'lda-ruby' | |
corpus = Lda::Corpus.new | |
corpus.add_document(Lda::TextDocument.new(corpus, "a lion is a wild feline animal", [])) | |
corpus.add_document(Lda::TextDocument.new(corpus, "a dog is a friendly animal", [])) | |
corpus.add_document(Lda::TextDocument.new(corpus, "a cat is a feline animal", [])) | |
lda = Lda::Lda.new(corpus) | |
lda.verbose = false | |
lda.num_topics = (2) | |
lda.em('random') |
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
match = { "$match" => { "$messages.created_at" => { "$gte" => 1.day.ago } } } | |
group = { "$group" => { _id: '$messages', count: {"$sum" => 1 } } } | |
sort = { "$sort" => { count: -1 } } | |
limit = { "$limit" => 3 } | |
Room.collection.aggregate([match, group, sort, limit]) |
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 classes | |
class ReducaoZ < ActiveRecord::Base | |
self.table_name = 'reducaoz' | |
belongs_to :empresa | |
belongs_to :impressorafiscal, foreign_key: 'impressorafiscal_id', class_name: 'ImpressoraFiscal' | |
belongs_to :usuario_cadastro, foreign_key: 'usuariocadastro_id', class_name: 'Usuario' | |
belongs_to :usuario_alteracao, foreign_key: 'usuarioalteracao_id', class_name: 'Usuario' | |
has_many :aliquotas, primary_key: 'id', foreign_key: 'reducaoz_id', class_name: 'Aliquota', dependent: :delete_all |
NewerOlder