Skip to content

Instantly share code, notes, and snippets.

View Findarato's full-sized avatar
🦁
Focusing

Joseph Harry Findarato

🦁
Focusing
View GitHub Profile
@Findarato
Findarato / nvidia_log.sh
Created July 26, 2017 22:40
log nvidia-smi to a file so it can be parsed
#!/bin/bash
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
mkdir -p /opt/nvidia
UTC_DATE=$(date +'%Y/%m/%d %H:%M:%S.000' -u)
for INDEX in {0..10}
do
@Findarato
Findarato / nvidia.conf
Created July 26, 2017 22:39
telegraf parse of nvidia
[[inputs.logparser]]
files = ["/opt/nvidia/nvidia_log.csv"]
from_beginning = true
[inputs.logparser.grok]
patterns = ["%{GPU}",'''%{TIMESTAMP_ISO8601:timestamp:ts-"2006/01/02 15:04:05.000"}''']
measurement = "gpu"
custom_patterns = '''
GPU %{DATA:timestamp:ts-"2006/01/02 15:04:05.000"}, %{DATA:gpu_name:tag}, %{DATA:slot:tag}, %{NUMBER:driver:float}, P%{NUMBER:pstate:int}, %{NUMBER:temperature:int}, %{NUMBER:gpu_utilization:int} %, %{NUMBER:memory_utilization:int} %, %{NUMBER:memory_total:int} MiB, %{NUMBER:memory_free:int} MiB, %{NUMBER:memory_used:int} MiB, %{NUMBER:fan_speed:int} %, %{NUMBER:power_draw:float} W, %{NUMBER:sm_clock:int} MHz, %{NUMBER:memory_clock:int} MHz, %{NUMBER:graphics_clock:int} MHz
'''
@Findarato
Findarato / fah.conf
Last active July 26, 2017 22:37
Telegraf parser for folding at home progress
# Stream and parse log file(s).
[[inputs.logparser]]
files = ["/var/lib/fahclient/log.txt"]
from_beginning = true
[inputs.logparser.grok]
patterns = ["%{FAH_WORKUNITS}","%{FAH_POINTS}"]
measurement = "fah"
custom_patterns = '''
FAH_WORKUNITS %{DATA:timestamp:ts-"2006-01-02:15:04:05"}\:WU%{NUMBER:workunit:tag}\:FS%{NUMBER:slot:string}\:%{DATA:core:string}\:Completed %{NUMBER:progress:int} out of %{NUMBER:total:int} steps
FAH_POINTS %{DATA:timestamp:ts-"2006-01-02:15:04:05"}\:WU%{NUMBER:workunit:tag}\:FS%{NUMBER:slot:string}\:Final credit estimate, %{NUMBER:points:float} points
@Findarato
Findarato / fstab
Created November 27, 2016 03:08
useful Mounts
#Ram Disks
none /home/joe/.cache tmpfs size=100M 0 0
@Findarato
Findarato / autostart
Last active November 15, 2016 19:19
PI Kiosk
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@point-rpi
@xset s off
@xset -dpms
@xset s noblank
@sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium/Default/Preferences

Keybase proof

I hereby claim:

  • I am findarato on github.
  • I am findarato (https://keybase.io/findarato) on keybase.
  • I have a public key ASDbH7QV2ucL3TzNaT3H7VTmcbtnUnVJz7YSLn7WywSQbAo

To claim this, I am signing this object:

<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-category.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@Findarato
Findarato / designer.html
Last active August 29, 2015 14:20
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@Findarato
Findarato / designer.html
Last active August 29, 2015 14:20
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../topeka-elements/topeka-datasource.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">