Skip to content

Instantly share code, notes, and snippets.

View glennswest's full-sized avatar
🏠
Working from home

Glenn West glennswest

🏠
Working from home
View GitHub Profile
@glennswest
glennswest / gist:cc8823f29013724f41a5
Created August 28, 2014 07:40
Marlin Menu Items for Filament Load and Unload
static void lcd_prepare_menu()
{
START_MENU();
MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
#ifdef SDSUPPORT
//MENU_ITEM(function, MSG_AUTOSTART, lcd_autostart_sd);
#endif
MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
MENU_ITEM(gcode, MSG_LOAD_FILAMENT, PSTR("G21 G F200 E10"));
@glennswest
glennswest / ultralcd.cpp.patch
Created August 28, 2014 07:40
Marlin Menu Items for Filament Load and Unload
static void lcd_prepare_menu()
{
START_MENU();
MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
#ifdef SDSUPPORT
//MENU_ITEM(function, MSG_AUTOSTART, lcd_autostart_sd);
#endif
MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
MENU_ITEM(gcode, MSG_LOAD_FILAMENT, PSTR("G21 G F200 E10"));
@glennswest
glennswest / setup-ip.yml
Created April 7, 2017 04:57
Ansible automatically create /etc/hosts file for all host - to give nice short names using dnsmasq
---
- hosts: all
tasks: []
- hosts: all
gather_facts: True
tasks:
- name: check connection
ping:
- name: setup
setup:
@glennswest
glennswest / fixnet.yml
Created April 8, 2017 06:26
Change RHEL 7 to use dnsmaq and /etc/host to do forward and reverse lookup
---
- hosts: all:bastion
vars:
description: "Update /etc/hosts"
tasks:
- name: setup
setup:
- name: "Change PEERDNS=yes to PEERDNS=no"
replace:
dest: /etc/sysconfig/network-scripts/ifcfg-eth0
This file has been truncated, but you can view the full file.
Jun 5 12:57:19 localhost rsyslogd: [origin software="rsyslogd" swVersion="7.4.7" x-pid="921" x-info="http://www.rsyslog.com"] start
Jun 5 12:57:08 localhost kernel: Initializing cgroup subsys cpuset
Jun 5 12:57:08 localhost kernel: Initializing cgroup subsys cpu
Jun 5 12:57:08 localhost kernel: Initializing cgroup subsys cpuacct
Jun 5 12:57:08 localhost kernel: Linux version 3.10.0-514.21.1.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Sat Apr 22 02:41:35 EDT 2017
Jun 5 12:57:08 localhost kernel: Command line: BOOT_IMAGE=/vmlinuz-3.10.0-514.21.1.el7.x86_64 root=UUID=8567ada0-df96-48c6-a3a5-f6e22b0397ff ro console=tty1 console=ttyS0 earlyprintk=ttyS0 rootdelay=300
Jun 5 12:57:08 localhost kernel: e820: BIOS-provided physical RAM map:
Jun 5 12:57:08 localhost kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
Jun 5 12:57:08 localhost kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
Jun 5 1
Jun 5 23:31:17 master3 atomic-openshift-master-api: I0605 23:31:17.413729 30842 panics.go:76] GET /apis/batch/v2alpha1/cronjobs: (12.918406ms) 200 [[openshift/v1.5.2+43a9be4 (linux/amd64) kubernetes/43a9be4 system:serviceaccount:openshift-infra:job-controller] 10.0.0.7:48278]
Jun 5 23:31:17 master3 atomic-openshift-master-api: I0605 23:31:17.427352 30842 panics.go:76] GET /apis/batch/v2alpha1/jobs: (12.940607ms) 200 [[openshift/v1.5.2+43a9be4 (linux/amd64) kubernetes/43a9be4 system:serviceaccount:openshift-infra:job-controller] 10.0.0.7:48278]
Jun 5 23:31:18 master3 atomic-openshift-master-api: I0605 23:31:18.229307 30842 panics.go:76] GET /api/v1/nodes?fieldSelector=metadata.name%3Dnode01&resourceVersion=0: (801.532µs) 200 [[openshift/v1.5.2+43a9be4 (linux/amd64) kubernetes/43a9be4] 138.91.162.136:1392]
Jun 5 23:31:18 master3 atomic-openshift-master-api: I0605 23:31:18.289841 30842 panics.go:76] PUT /api/v1/nodes/node01/status: (12.864604ms) 200 [[openshift/v1.5.2+43a9be4 (linux/amd64) kubernetes
@glennswest
glennswest / gist:fb453288ab43b9819527199e385f019c
Created August 15, 2017 02:11
Find Linux Root drive and partition
rootdev=`findmnt --target / -o SOURCE -n`
echo $rootdev
rootdrivename=`lsblk -no pkname $rootdev`
rootdrive="/dev/"$rootdrivename
echo $rootdrive
majorminor=`lsblk $rootdev -o MAJ:MIN | tail -1`
echo $majorminor
part_number=${majorminor#*:}
echo $part_number
@glennswest
glennswest / growazureroot.sh
Created August 15, 2017 02:46
Grow Azure RHEL Root Value - Full Auto
echo "Grow Root FS"
rootdev=`findmnt --target / -o SOURCE -n`
rootdrivename=`lsblk -no pkname $rootdev`
rootdrive="/dev/"$rootdrivename
majorminor=`lsblk $rootdev -o MAJ:MIN | tail -1`
part_number=${majorminor#*:}
yum install -y cloud-utils-growpart.noarch
growpart $rootdrive $part_number -u on
xfs_growfs $rootdev