Skip to content

Instantly share code, notes, and snippets.

View nelaaro's full-sized avatar

Aaron Nel nelaaro

View GitHub Profile
@nelaaro
nelaaro / steam.sys.info
Last active December 19, 2015 22:48
steam system info for bugs.
Processor Information:
Vendor: GenuineIntel
Speed: 1734 Mhz
8 logical processors
4 physical processors
HyperThreading: Supported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
SSSE3: Supported
@nelaaro
nelaaro / tokudb_compress
Last active September 29, 2017 11:51
show the tokudb compression per table and tokudb file created for table.
mysql -sNe 'SELECT dictionary_name, internal_file_name, table_name, " " FROM information_schema.tokudb_file_map WHERE table_dictionary_name = "main" OR table_dictionary_name LIKE "key-%"' | perl -F'\t' -ane '@out=qx(tokuftdump --nodata --header --rootnode /srv/mysql/data/$F[1]); foreach $ftdump (@out) { if($ftdump=~/^ compression_method=([0-9]+)$/) { print $F[2]."\t".$F[0]."\t".$1."\n"; last } }'
# https://dba.stackexchange.com/questions/164879/tokudb-row-format-is-not-being-accepted/164887#164887
@nelaaro
nelaaro / gist:9ac6fee4e8fdac9ee8fdd25aeb5456f8
Last active February 1, 2022 08:59
12d1:14dc Huawei Technologies Co., Ltd. E33372 LTE/UMTS/GSM HiLink Modem/Networkcard, Huawei Technologies Co., Ltd. E353/E3131 (Mass storage mode)
sudo usb_modeswitch -v 12d1 -p 1f01 -V 12d1 -P 14DC -J
# Bus 001 Device 028: ID 12d1:14dc Huawei Technologies Co., Ltd. E33372 LTE/UMTS/GSM HiLink Modem/Networkcard
# Bus 001 Device 027: ID 12d1:1f01 Huawei Technologies Co., Ltd. E353/E3131 (Mass storage mode)
sudo usb_modeswitch -h 15s  Thu 23 Nov 2017 00:13:05 SAST
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.5.1 (C) Josua Dietze 2017
* Based on libusb1/libusbx
@nelaaro
nelaaro / ssh_agent_start.fish
Created December 6, 2017 08:53 — forked from gerbsen/ssh_agent_start.fish
Auto-launching ssh-agent in fish shell
# content has to be in .config/fish/config.fish
# if it does not exist, create the file
setenv SSH_ENV $HOME/.ssh/environment
function start_agent
echo "Initializing new SSH agent ..."
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
echo "succeeded"
chmod 600 $SSH_ENV
. $SSH_ENV > /dev/null
@nelaaro
nelaaro / README-Template.md
Created April 5, 2018 08:23 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

# CentOS-Vault.repo
#
# CentOS Vault holds packages from previous releases within the same CentOS Version
# these are packages obsoleted by the current release and should usually not
# be used in production
#-----------------
[C6.0-base]
name=CentOS-6.0 - Base
baseurl=http://vault.centos.org/6.0/os/$basearch/
# CentOS-Vault.repo
#
# CentOS Vault holds packages from previous releases within the same CentOS Version
# these are packages obsoleted by the current release and should usually not
# be used in production
#-----------------
#
# yum [action] --disablerepo=* --enablerepo=511-base
#
@ECHO off
:top
CLS
ECHO Choose a shell:
ECHO [1] cmd
ECHO [2] bash
ECHO [3] PowerShell
ECHO [4] Python
ECHO.
ECHO [5] restart elevated
@nelaaro
nelaaro / remove_apt_cache
Created January 28, 2019 13:49 — forked from marvell/remove_apt_cache
Remove APT cache (for Dockerfile)
apt-get clean autoclean
apt-get autoremove --yes
rm -rf /var/lib/{apt,dpkg,cache,log}/
@nelaaro
nelaaro / windows is my terminal running as administrator
Last active January 29, 2019 09:08
windows is my terminal running as administrator
# My terminals don't run as administrator
To test if youre `CMD`, `PowerShell` is running as administrator.
## PASS
C:\Users\user>net session
There are no entries in the list.
## Fail