O que fazer quando um headseat não é listado para conexão bluetooth no Linux.
- Instale os pacotes bluetooth, bluez, bluez-tools e rfkill via terminal:
sudo apt-get install bluetooth bluez bluez-tools rfkill -y
class TestingClass {
fun testingFunction() {
for (everyday in this year 2017) {
// Do something with everyday
println(everyday.toString())
}
}
private infix fun year(year: Int): DateRange {
mkdir ~/vim | |
cd ~/vim | |
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim | |
# Compiled on Jul 20 2017 | |
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz | |
export VIMRUNTIME="$HOME/vim/runtime" | |
export PATH="$HOME/vim:$PATH" | |
cd - |
people = [Person.where(id: [3, 4])] | |
plan = Plan.find(18) | |
people.each do |person| | |
purchase = person.purchases.last.dup | |
purchase.microgym = 'nos' | |
purchase.description = 'Chamar quem se inscreveu e nunca compareceu' | |
purchase.plan_id = plan.id | |
purchase.save | |
end |
file = File.open('/tmp/cancel.csv', 'w') | |
file << "Mes de cancelamento, cliente, Modalidade, Unidade, Compras apos cancelar, Ultimo Plano comprado, Mes da ultima compra" | |
cancelled = Purchase.cancelled.recurrency.distinct(:person_id).joins(:plan).where("cancelled >= ?", Date.current.beginning_of_year) | |
cancelled.find_each do |purchase| | |
person = purchase.person | |
if person.purchases.where("created_at > ?", purchase.cancelled).exists? | |
new_purchases = person.purchases.where("created_at >= ?", purchase.cancelled) |
ORM-Adapter,Operation benchmark,User CPU time,System CPU time,Total CPU time,Real time,Memory used in kb,Transaction or Not | |
sequel-mysql,Model Object Creation: 1600 objects,0.536818,0.080193,0.639675,1.156077,6072,No Transaction | |
activerecord-mysql,Model Object Creation: 1600 objects,0.986834,0.051411,1.058469,1.481707,2436,No Transaction | |
sequel-mysql,Model Object Creation: 1600 objects,0.375353,0.043466,0.440293,0.640171,264,Transaction | |
activerecord-mysql,Model Object Creation: 1600 objects,0.638790,0.014195,0.675404,0.780479,0,Transaction | |
sequel-mysql,Model Object Select: 3200 objects 32 times,0.125732,0.000409,0.145452,0.182796,0,No Transaction | |
activerecord-mysql,Model Object Select: 3200 objects 32 times,0.841494,0.004042,0.865443,0.903764,5016,No Transaction | |
sequel-mysql,Model Object Select: 3200 objects 32 times,0.132256,0.000000,0.152481,0.190061,0,Transaction | |
activerecord-mysql,Model Object Select: 3200 objects 32 times,0.844372,0.003153,0.866892,0.905380,0,Transaction | |
sequel-mysql,Model Object Select |
# With this I was able to successfuly install everything | |
# on a x86 (32-bit) instance of Amazon Linux. | |
# | |
# You should probably not run this script | |
# It is a much better idea to use this as an Install guide | |
# Just follow it down, use your tab and be happy | |
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig | |
export PATH=/usr/bin:$PATH | |
export LDFLAGS=-L/usr/lib64:/usr/lib |
Steps: | |
- Na AWS, na instancia do `RDS DB`, ver o DNS da instância do banco | |
- Pegar no `database.yml` o user e password do banco da aplicação | |
- Rodar o comando `mysqldump -u user -h 'DNS_DA_INSTANCIA_DO_BANCO' DATABASE -p > dump.sql | |
- Informar a senha da aplicação quando for exigida a senha do banco. |
# Gate ñ está expportando acesso: ? | |
# Addon não cancela: | |
# Ver se tem Location::Addon criado para a unidade / addon, muitas vezes no tem, mas tem no PurchaseAddon | |
# se precisar cancelar manualmente | |
user = User.find(x) # o solicitante do tkt | |
cancelling = PurchaseAddonCancelator.new(purchase, addon, user) | |
cancelling.send :transaction | |
str_date = '2017-09-16' | |
locations_cached_ids = DailyReportCache.where('reference_date = ?', str_date).map &:location_id | |
active_locations_ids = Location.active.map &:id | |
location_ids = active_locations_ids - locations_cached_ids | |
location_ids.each do |location_id| | |
parsed_date = Date.parse(str_date).strftime('%d/%m/%Y') |