Skip to content

Instantly share code, notes, and snippets.

View silvernode's full-sized avatar

Mollusk silvernode

  • USA
View GitHub Profile
@silvernode
silvernode / T420 Specs
Created February 13, 2018 00:22
inxi output T420
System: Host: tneon Kernel: 4.13.0-32-generic x86_64 (64 bit) Desktop: KDE Plasma 5.12.0
Distro: neon 16.04 xenial
Machine: System: LENOVO (portable) product: 4177R3U v: ThinkPad T420
Mobo: LENOVO model: 4177R3U Bios: LENOVO v: 83ET78WW (1.48 ) date: 01/21/2016
CPU: Dual core Intel Core i5-2430M (-HT-MCP-) cache: 3072 KB
clock speeds: max: 3000 MHz 1: 2392 MHz 2: 2392 MHz 3: 2392 MHz 4: 2392 MHz
Graphics: Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller
Display Server: X.Org 1.19.5 drivers: (unloaded: fbdev,vesa) Resolution: 1366x768@60.10hz
GLX Renderer: Mesa DRI Intel Sandybridge Mobile GLX Version: 3.0 Mesa 17.2.4
Audio: Card Intel 6 Series/C200 Series Family High Definition Audio Controller driver: snd_hda_intel
#!/usr/bin/bash
# Colors
RED='\033[0;31m'
LRED="\033[1;31m"
BLUE="\033[0;34m"
LBLUE="\033[1;34m"
GREEN="\033[0;32m"
LGREEN="\033[1;32m"
YELLOW="\033[1;33m"
@silvernode
silvernode / tizonia-script.sh
Last active June 21, 2018 21:14
custom script used to use tizonia
#!/bin/bash
DEVICE_ID=""
USERNAME=""
PASSWORD=""
echo -e "[1] Jimi Hendrix\n\n"
echo -e -n ">> "
@silvernode
silvernode / tizonia.debug.txt
Created June 26, 2018 15:22
Debug log for Tizonia
This file has been truncated, but you can view the full file.
[stdout] 26-06-2018 15:20:06.171 - [PID:5508][TID:5508] [TRACE] [tiz.platform.rc] [tizrc.c:obtain_xdg_config_dir:576] --- XDG_CONFIG_DIRS [/snap/tizonia/188/etc/xdg:/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg] ...
[stdout] 26-06-2018 15:20:06.171 - [PID:5508][TID:5508] [TRACE] [tiz.platform.rc] [tizrc.c:obtain_xdg_config_dir:580] --- XDG_CONFIG_DIR - [/snap/tizonia/188/etc/xdg] ...
[stdout] 26-06-2018 15:20:06.171 - [PID:5508][TID:5508] [TRACE] [tiz.platform.rc] [tizrc.c:obtain_xdg_config_dir:604] --- Using config location /snap/tizonia/188/etc/xdg/tizonia/tizonia.conf
[stdout] 26-06-2018 15:20:06.171 - [PID:5508][TID:5508] [TRACE] [tiz.platform.rc] [tizrc.c:obtain_xdg_config_home:627] --- HOME [/home/mollusk/snap/tizonia/188]
[stdout] 26-06-2018 15:20:06.171 - [PID:5508][TID:5508] [TRACE] [tiz.platform.rc] [tizrc.c:tiz_rcfile_init:663] --- Looking for [3] rc files...
[stdout] 26-06-2018 15:20:06.171 - [PID:5508][TID:5508] [TRACE] [tiz.platform.rc] [tizrc.c:tiz_rcfile_init:676] --- Checking for r
@silvernode
silvernode / C-states.md
Created February 11, 2019 06:14 — forked from wmealing/C-states.md
What are CPU "C-states" and how to disable them if needed?

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

@silvernode
silvernode / site-status.sh
Last active February 13, 2019 16:15
[Bash] Check if a site is online or offline
#!/bin/bash
FAIL_CODE=6
if [ -z "${1}" ];then
echo "usage: ${0} example.com"
exit
fi
check_status(){
@silvernode
silvernode / greeter.log
Created April 7, 2019 06:32
GDM log: gretter errors
[root@voidpad gdm]# cat greeter.log | grep error
> Internal error: Could not resolve keysym XF86MonBrightnessCycle
> Internal error: Could not resolve keysym XF86MonBrightnessCycle
Gdk-Message: 20:15:48.248: gsd-clipboard: Fatal IO error 11 (Resource temporarily unavailable) on X server :1024.
Gdk-Message: 20:15:48.250: gsd-xsettings: Fatal IO error 11 (Resource temporarily unavailable) on X server :1024.
Gdk-Message: 20:15:48.251: gsd-power: Fatal IO error 11 (Resource temporarily unavailable) on X server :1024.
Gdk-Message: 20:15:48.253: gsd-keyboard: Fatal IO error 11 (Resource temporarily unavailable) on X server :1024.
Gdk-Message: 20:15:48.257: gsd-color: Fatal IO error 11 (Resource temporarily unavailable) on X server :1024.
Gdk-Message: 20:15:48.266: gsd-media-keys: Fatal IO error 11 (Resource temporarily unavailable) on X server :1024.
1. Edit `/etc/default/grub` with admin rights
2. Find line: GRUB_CMDLINE_LINUX_DEFAULT=" "
3. Add in quotes: GRUB_CMDLINE_LINUX_DEFAULT="processor.max_cstate=1 idle=poll"
4. Save the file
5. Rebuild grub boot menu: grub-mkconfig -o /boot/grub/grub.cfg
5a.Some distributions require: grub2-mkconfig -o /boot/grub2/grub.cfg
6. Reboot system
Notes: If you are using Fedora without UEFI and cannot regenerate your grub menu,
@silvernode
silvernode / type-seqs.nim
Last active February 13, 2020 02:09
Learning types and seqs
import strformat
type
Character* = object
name*, location*: string
credits*: int
ship*: string
type