Skip to content

Instantly share code, notes, and snippets.

Tuan T. Pham neofob

Block or report user

Report or block neofob

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@neofob
neofob / main.yml
Last active May 20, 2019 — forked from rothgar/main.yml
Generate /etc/hosts with Ansible
View main.yml
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source.
# Will include all hosts the playbook is run on.
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html
- name: "Build hosts file"
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item]['ansible_default_ipv4']['address'] }} {{item}}" state=present
when: hostvars[item]['ansible_facts']['default_ipv4'] is defined
with_items:
- "{{ groups['all'] }}"
@neofob
neofob / AC-Bikeroute.md
Last active May 5, 2019
Atlantic Coast -- North Bound
View AC-Bikeroute.md
View 01-my-network.yml
network:
version: 2
renderer: networkd
ethernets:
# your ethernet interface(s)
enp6s0:
# dhcp4: true
addresses:
- 192.168.1.42/24
gateway4: 192.168.1.1
View CrunchBox.md

CrunchBox

  • pcpartpicker link of AMD Threadripper based box (1 Radeon VII)
@neofob
neofob / temper.sh
Created Dec 23, 2018
Testing graphite metrics of temper USB sensor
View temper.sh
#!/usr/bin/env bash
# https://github.com/wiryonolau/temper/tree/patch-1
# __author__: tuan t. pham
METRIC_PREFIX=${METRIC_PREFIX:=$HOSTNAME}
METRIC_NAME=${METRIC_NAME:=ambient}
SEND=${SEND:=0}
GRAPHITE_HOST=${GRAPHITE_HOST:=localhost}
GRAPHITE_PORT=${GRAPHITE_PORT:=2003}
@neofob
neofob / NewMW.md
Created Dec 7, 2018
Old and new MW without and with correct Hawaii GPU detection
View NewMW.md
Stderr output

<core_client_version>7.6.31</core_client_version>
<![CDATA[
<stderr_txt>
<search_application> milkyway_separation 1.46 Linux x86_64 double OpenCL </search_application>
@neofob
neofob / mw_build.sh
Last active Dec 9, 2018
milkyway at home opencl build
View mw_build.sh
#!/bin/bash
mkdir /tmp/MW /tmp/MW/build
cd /tmp/MW
git clone --depth=10 https://github.com/Milkyway-at-home/milkywayathome_client
cd milkywayathome_client
git submodule init
git submodule update --recursive
cd ../build
cmake -DBUILD_32=OFF -DSEPARATION=ON -DNBODY=OFF -DSEPARATION_OPENCL=ON \
@neofob
neofob / telegraf.conf
Created Nov 27, 2018
telegraf config
View telegraf.conf
# Telegraf Configuration
#
# Telegraf is entirely plugin driven. All metrics are gathered from the
# declared inputs, and sent to the declared outputs.
#
# Plugins must be declared in here to be active.
# To deactivate a plugin, comment out the name and any variables.
#
# Use 'telegraf -config telegraf.conf -test' to see what metrics a config
# file would generate.
You can’t perform that action at this time.