This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Backup script for trakt.tv (API v2). | |
Live demo: https://darekkay.com/blog/trakt-tv-backup/ | |
*/ | |
// create a Trakt app to get a client API key: http://docs.trakt.apiary.io/#introduction/create-an-app | |
$apikey = "CLIENT_API_KEY"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sam016.vsflatomation.service.ble; | |
import java.util.HashMap; | |
import java.util.UUID; | |
public class AllGattCharacteristics { | |
private static HashMap<String, String> attributes = new HashMap(); | |
static { | |
attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_export] | |
macro_rules! avec { | |
($($element:expr),*) => {{ | |
// check that count is const | |
const C: usize = $crate::count![@COUNT; $($element),*]; | |
#[allow(unused_mut)] | |
let mut vs = Vec::with_capacity(C); | |
$(vs.push($element);)* | |
vs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://askubuntu.com/questions/1156167/unable-to-get-wifi-adapter-working-clean-19-04-install-network-unclaimed | |
sudo apt update | |
sudo apt install git build-essential | |
git clone https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git | |
cd backport-iwlwifi/ | |
make defconfig-iwlwifi-public | |
sed -i 's/CPTCFG_IWLMVM_VENDOR_CMDS=y/# CPTCFG_IWLMVM_VENDOR_CMDS is not set/' .config | |
make -j4 | |
sudo make install | |
sudo modprobe iwlwifi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::collections::HashMap; | |
use std::fmt; | |
use std::io; | |
use std::num::ParseFloatError; | |
/* | |
Types | |
*/ | |
#[derive(Clone)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Instructions: https://index.ros.org/doc/ros2/Installation/Linux-Install-Debians/ | |
set -e | |
# flags | |
INSTALL_OPTIONAL=1 | |
USE_ROS1_PKGS=1 # additional packages for examples | |
INSTALL_BASHRC_LINE=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sam016.vsflatomation.service.ble; | |
import java.util.HashMap; | |
import java.util.UUID; | |
public class AllGattCharacteristics { | |
private static HashMap<String, String> attributes = new HashMap(); | |
static { | |
attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://gist.githubusercontent.com/nalt/dfa2abc9d2e3ae4feb82ca5608090387/raw/roslaunch.dtd | |
find /opt/ros -iname '*.launch' -exec xmllint --valid --dtdvalid roslaunch.dtd --noout {} ';' 2>&1 | grep -v "no DTD found" | grep -v '<launch>' | |
# Missing DOCTYPE is reported as an error. | |
# $(...) will be rejected by this DTD for enum attributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo rm -fr /opt/franz | |
sudo rm -fr /usr/share/applications/franz.desktop | |
# create installation dir | |
sudo mkdir -p /opt/franz | |
#install franz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# vi:syntax=sh | |
# vi:filetype=sh | |
# Current script decrypts and opens a gpg-encrypted document that is stored in | |
# the password-store of the *pass* Unix password manager | |
# | |
# Support exists exclusively on Linux desktop platforms | |
function print_fatal_msg() { |
NewerOlder