CCCPaste

Get distance from Google Maps

#get distance from Google Mapes
wget -q -O- "https://maps.googleapis.com/maps/api/distancematrix/json?origins=2645%2016th%20Ave%20NE,%20Naples,%20FL%2034120&destinations=571%2097th%20Ave%20N%20Naples,%20FL%2034108&units=imperial"

Javascript time between two days

<!DOCTYPE html>
<html lang="en">
<head>
<title>Until Vacation TIME!!!</title>
<meta charset="utf-8">

Watch Random Rick and Morty

#!/bin/bash

#youtube-dl and mpv needed
#sudo apt install mpv youtube-dl

Get Volume Level of Pulse audio

#/bin/sh

#get default sink name
name="$(pacmd stat | awk -F": " '/^Default sink name: /{print $2}')"

Python GTK Clock

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import pygtk
pygtk.require('2.0')

Pairing Logitech mouse and keyboard

$ solaar-cli unpair mouse
Unpaired 1: Wireless Mouse M525 [M525:DAFA335E]
$ solaar-cli pair
Pairing: turn your new device on (timing out in 20 seconds).
Paired device 1: Wireless Mouse M525 [M525:DAFA335E]

2017 Linux setup with Fluxbox and conky

apt install kupfer unzip blueman-applet vim git nmap gimp pcmanfm youtube-dl mpv dos2unix busybox

#fluxbox setup
sudo apt install fluxbox maximus numlockx
wget "https://gist.github.com/metalx1000/440c833d18dcf7b624ff70c8aed4f92a/archive/01b30b2767378bd9dc0f110d0d1a98583c17ea3b.zip" -O /tmp/flux.zip

Python GTK get keypressed

#!/usr/bin/env python

import gtk,os,random

class WIN:

Maximize all Windows

#!/bin/bash
window_ids=$(wmctrl -l | cut -f1 -d " ")
for window_id in $window_ids
do
wmctrl -i -r "$window_id" -b toggle,maximized_vert,maximized_horz

bluetooth notes

#scan for devices that are discoverable
hcitool scan

#list connected devices
hcitool con