Skip to content

Instantly share code, notes, and snippets.

View XenGi's full-sized avatar
☠️
🪄✨ hax hax

Ricardo Band XenGi

☠️
🪄✨ hax hax
View GitHub Profile
Lenovo Thinkpad T430
====================
- T430: 200,-
- Type: 2347-GAG
- S/N: PB-RHZD3
- CPU: Intel Core i5-3320M (2.6GHz)
- RAM: 16GB (2x 8GB)
- 70++ battery (94Wh) (FRU 45N1011)
- Lenovo 65W Power Brick included
- keyboard of choice included
@XenGi
XenGi / database_fields.md
Last active August 18, 2017 15:31
Database fields fixed

Databases are hard

Databses used to have some fields that never made sense or were hard to fill in. Some where just chosen for the wrong reasons. For example the gender field is mostly useless and was only chosen to guess the pronoun when generating letters. For that reason and because it's really not that simple we should replace it with what we're actually interested in, the pronoun. Which is a free text field. So if you are an Apache Attackhelicopter and want to be correctly addressed you finally can.

new fields

@XenGi
XenGi / T470s-T470-T470p-T25.md
Last active October 26, 2017 14:17
Comparison between T470s, T470, T470p, T25 (maximum specs)
T470s T470 T470p (Intel) T470p (NVIDIA) T25 (NVIDIA)
CPU #f03c15 i7-7600U #f03c15
@XenGi
XenGi / etc_pacman.d_hooks_linux-modules-post.hook
Created May 15, 2017 09:08
arch kernel update survival kit
[Trigger]
Operation = Upgrade
Type = Package
Target = linux
[Action]
Description = Restore Linux kernel modules
When = PostTransaction
Depends = coreutils
Depends = rsync
@XenGi
XenGi / fuckyou.fish
Last active April 8, 2017 17:46
Rage quit support for fish shell
# ~/.config/fish/functions/fuckyou.fish
# usage: fuckyou firefox
# dependencies: toilet
function fuckyou --description "Rage quit support for fish"
killall -9 $argv[1]
if test $status = 0
echo
echo (set_color brred)" (╯°□°)╯"(set_color bryellow)"︵"(set_color FFBF00) (echo $argv[1] | toilet -f term -F rotate)(set_color normal)
echo
else
@XenGi
XenGi / dmesg
Last active March 31, 2017 14:30
[ 3035.830541] CPU1: Core temperature above threshold, cpu clock throttled (total events = 4729)
[ 3035.830542] CPU0: Core temperature above threshold, cpu clock throttled (total events = 4729)
[ 3035.830543] CPU2: Package temperature above threshold, cpu clock throttled (total events = 4742)
[ 3035.830544] CPU3: Package temperature above threshold, cpu clock throttled (total events = 4742)
[ 3035.830547] CPU0: Package temperature above threshold, cpu clock throttled (total events = 4742)
[ 3035.830552] CPU1: Package temperature above threshold, cpu clock throttled (total events = 4742)
[ 3035.830560] mce: [Hardware Error]: CPU 0: Machine Check: 0 Bank 128: 000000008805080b
[ 3035.830563] mce: [Hardware Error]: TSC 758bd6bd630
[ 3035.830565] mce: [Hardware Error]: PROCESSOR 0:306d4 TIME 1490970296 SOCKET 0 APIC 0 microcode 24
[ 3035.830568] mce: [Hardware Error]: CPU 1: Machine Check: 0 Bank 128: 000000008805080b
@XenGi
XenGi / reflow.md
Last active March 21, 2017 01:38
Halogen reflow oven
@XenGi
XenGi / battery.sh
Created July 20, 2016 21:42
battery block for i3blocks
#!/bin/bash
main() {
local ac=$(cat /sys/class/power_supply/AC/online)
if [[ -d /sys/class/power_supply/BAT0 ]] ; then
local int_present=$(cat /sys/class/power_supply/BAT0/present)
local int_capacity=$(cat /sys/class/power_supply/BAT0/capacity)
local int_status=$(cat /sys/class/power_supply/BAT0/status)
else
[
{
"backcolor": "#ebebeb",
"name": "meckbd_v1 columns",
"author": "XenGi",
"background": {
"name": "Steel brushed horizontal",
"style": "background-image: url('/bg/metal/iron_texture66.jpg');"
},
"switchMount": "cherry",