Skip to content

Instantly share code, notes, and snippets.

Avatar

Mika Tuupola tuupola

View GitHub Profile
View macos.txt
angle:0 s:0.000000 c:1.000000 z:0.000000
angle:1 s:0.017452 c:0.999848 z:0.020943
angle:2 s:0.034899 c:0.999391 z:0.041879
angle:3 s:0.052336 c:0.998630 z:0.062803
angle:4 s:0.069756 c:0.997564 z:0.083708
angle:5 s:0.087156 c:0.996195 z:0.104587
angle:6 s:0.104528 c:0.994522 z:0.125434
angle:7 s:0.121869 c:0.992546 z:0.146243
angle:8 s:0.139173 c:0.990268 z:0.167008
angle:9 s:0.156434 c:0.987688 z:0.187721
View risc-link-dump.txt
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"