Skip to content

Instantly share code, notes, and snippets.

Mika Tuupola tuupola

Block or report user

Report or block tuupola

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pmt.php
<?php
function pmt($interest, $payments, $pv, $fc = 0.00, $type = 0)
{
$xp = pow((1 + $interest), $payments);
return
($pv * $interest * $xp / ($xp - 1) + $interest / ($xp - 1) * $fc) *
($type == 0 ? 1 : 1 / ($interest + 1));
}
View whitelist.txt
s.click.aliexpress.com
best.aliexpress.com
createsend.com
View nginx.conf
http {
# Disable sending the server identification
server_tokens off;
# Prevent displaying Botpress in an iframe (clickjacking protection)
add_header X-Frame-Options SAMEORIGIN;
# Prevent browsers from detecting the mimetype if not sent by the server.
add_header X-Content-Type-Options nosniff;
View gist:a655e576835df0f9435f175bc78d911f
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;
View elementary-install.txt
# 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
View tyrant-s-b.txt
# 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 Mar 7, 2019
Avoid Error: node08: Unsupported special dependency :python
View node08.rb
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 Dec 8, 2018
Vagrant virtual machine for mender-convert
View Vagrantfile
# -*- 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"
View cmdline.txt
$ 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
View tyrant-s.txt
# 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
You can’t perform that action at this time.