Skip to content

Instantly share code, notes, and snippets.

View tuupola's full-sized avatar

Mika Tuupola tuupola

View GitHub Profile
LD [M] drivers/usb/serial/usbserial.o
CC [M] drivers/usb/storage/sddr55.o
CC [M] drivers/usb/storage/shuttle_usbat.o
In file included from drivers/usb/storage/karma.c:13:
./include/scsi/scsi_cmnd.h:36:18: error: variably modified ‘table’ at file scope
struct sg_table table;
^~~~~
./include/scsi/scsi_cmnd.h: In function ‘scsi_sg_count’:
./include/scsi/scsi_cmnd.h:186:23: error: request for member ‘nents’ in something not a structure or union
return cmd->sdb.table.nents;
# Fix WiFi
$ sudo apt update
$ sudo apt install bcmwl-kernel-source
$ sudo apt upgrade
$ sudo reboot
# Install NVidia driver
$ sudo apt install nvidia-driver-430
$ sudo reboot
# dump
# version
# Betaflight / MATEKF405 (MKF4) 4.0.2 May 5 2019 / 12:02:40 (56bdc8d26) MSP API: 1.41
# start the command batch
batch start
board_name MATEKF405
manufacturer_id
@tuupola
tuupola / node08.rb
Last active March 7, 2019 06:36
Avoid Error: node08: Unsupported special dependency :python
class Node08 < Formula
desc "Platform built on V8 to build network applications"
homepage "https://nodejs.org/"
url "https://nodejs.org/dist/v0.8.28/node-v0.8.28.tar.gz"
sha256 "50e9a4282a741c923bd41c3ebb76698edbd7b1324024fe70cedc1e34b782d44f"
bottle do
sha256 "f6bd80020b36c6558891c3046978b863e4252f5308d006e697e040a2827a7757" => :el_capitan
sha256 "3f6e33df20eece207138af79b7fb323c41ef91d38d97f096f749fafa557cd8af" => :yosemite
sha256 "e4fa19c0d05ba11914f8faac32bf5b990f015e55e5ee60be7fb4145c96798b36" => :mavericks
@tuupola
tuupola / Vagrantfile
Created December 8, 2018 07:34
Vagrant virtual machine for mender-convert
# -*- mode: ruby -*-
# vi: set ft=ruby :
# https://mender.io/
# https://github.com/mendersoftware/mender-convert
# https://github.com/sprotheroe/vagrant-disksize
# https://github.com/fgrehm/vagrant-cachier
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
$ pwd
/home/tuupola/mender-convert/output
$ cat cmdline.txt
dwc_otg.lpm_enable=0 console=serial0,115200 root=${mender_kernel_root} rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quietdwc_otg.lpm_enable=0 console=serial0,115200 root=${mender_kernel_root} rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh
# version
# Betaflight / MATEKF405 (MKF4) 3.4.1 Aug 2 2018 / 08:10:30 (1d99444d9) MSP API: 1.39
board_name MATEKF405
manufacturer_id
# name
name Tyrant-S
# resources
# nm -Du /usr/lib/libbrcmEGL.so
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
w __cxa_finalize
U __errno_location
w __gmon_start__
U atan2f
U calloc
U dlopen
U dlsym
/* Set default locale from the first parameter in url. */
$app->add(function ($request, $response, $next) {
$params = $request->getAttribute("routeInfo")[2];
if (empty($params["locale"])) {
Locale::setDefault("et");
} else {
Locale::setDefault($params["locale"]);
}
return $next($request, $response);
});
$ curl "https://192.168.50.52/todos" \
--request POST \
--include \
--insecure \
--header "Authorization: Bearer $TOKEN" \
--header "Content-Type: application/json" \
--data '{ "title": "Test the API", "order": 10 }'
HTTP/1.1 201 Created
ETag: "c39de417d4d1f5fe22d19cad68d672d8"