Skip to content

Instantly share code, notes, and snippets.

View timvisee's full-sized avatar
Consuming coffee

Tim Visée timvisee

Consuming coffee
View GitHub Profile
@timvisee
timvisee / .vimrc
Created June 28, 2019 14:29
Greatly reduced vimrc base for @eloydegen
""" Configure vim-plug
set nocompatible
filetype off
" Begin vim-plug plugin loading
call plug#begin('~/.local/share/nvim/plugged')
" Jumping
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
use std::cmp;
use std::io::{self, BufRead, BufReader, Cursor, Error as IoError, Read, Write};
use bytes::{BufMut, BytesMut};
use ece::Aes128GcmEceWebPush;
/// The cryptographic mode for a crypter: encrypt or decrypt.
pub enum CryptMode {
/// Encrypt data while transforming.
Encrypt,
/*
* Ultrasonic Sensor HC-SR04 and Arduino Tutorial
*
* by Dejan Nedelkovski,
* www.HowToMechatronics.com
*
*/
// defines pins numbers
const int trigPin = 9;
Qt module dev package lib package
-------------------------------------------------------------------------
bluetooth qtconnectivity5-dev libqt5bluetooth5
concurrent qtbase5-dev libqt5concurrent5
connectivity qtmobility-dev libqtconnectivity1
contacts qtmobility-dev libqt5contacts5
core qtbase5-dev libqt5core5a
dbus qtbase5-dev libqt5dbus5
designer qttools5-dev libqt5designer5
designercomponents qttools5-dev libqt5designercomponents5
Compiling num-traits v0.2.6
Compiling typenum v1.10.0
Compiling num-complex v0.2.1
Compiling matrixmultiply v0.1.14
Checking rand_core v0.3.0
Checking rawpointer v0.1.0
Checking libc v0.2.43
Checking libm v0.1.2
Checking rand_core v0.2.2
Checking rand v0.5.5
extern crate nalgebra;
use nalgebra::geometry::Point3;
/// Given a list of points, calculate the rotation/angle the edges between points in radians.
///
/// In order to make reliable calculations the first two points are dropped in the result.
/// If a list of less than 3 points is given, an emtpy result is returned.
fn calc_point_angles(points: &Vec<Point3<f64>>) -> Vec<f64> {
points
@timvisee
timvisee / SUBREDDIT_LIST.md
Last active December 22, 2023 02:13
Get a list of subreddits you're subscribed to on reddit. https://timvisee.com/blog/list-export-your-subreddits/

As posted on: https://timvisee.com/blog/list-export-your-subreddits/

Get a list of your subreddits

To obtain a list of your subreddits, do the following:

  • First make sure you're logged in on reddit, on a desktop browser.
  • Then visit reddit.com/subreddits.
  • Then put the following snippet in your browsers address bar, and press Enter.
    Make sure javascript: is included at the beginning, your browser might remove it while copy-pasting for security reasons:
<?php
function duration($s) {
do
$c[] = str_pad(isset($c) && sizeof($c) > 1 ? $s : $s % 60, isset($c) && $s < 60 ? 1 : 2, 0, STR_PAD_LEFT);
while(($s = floor($s / 60)) > 0 && sizeof($c) < 3);
return implode(":", array_reverse($c));
}
# While booting, the following is printed:
/dev/sda1: recovering journal
/dev/sda1: clean, 105840/70806080 files, 1333715/28320000 blocks
[10.191157] ACPI Exception: AE_NOT_FOUND, Error reading AC Adapter state (201
[11.828528] i915 0000:00:02.0: Invalid PCI ROM header signature: expecting 0x
aa55, got 0x0000
# Then the screen clears, and get stuck with a single cursor in the top left (not blinking)