Skip to content

Instantly share code, notes, and snippets.

View jakimfett's full-sized avatar

jakimfett jakimfett

View GitHub Profile
#!/bin/bash
DISKAVAILABLE=$(df / | awk '{ a = $3 } END { print a }');
DISKUSED=$(df / | awk '{ a = $2 } END { print a }');
DISKTOTAL=$((DISKAVAILABLE+DISKUSED));
DISKPERCENTUSED=$(df / | awk '{ a = $5 } END { print a }');
MEMUSE=$(free -m | head -n 2 | tail -n 1 | awk {'print $3'});
MEMTOTAL=$(free -m | head -n 2 | tail -n 1 | awk {'print $2'});
SWAPUSE=$(free -m | head -n 3 | tail -n 1 | awk {'print $3'});
SWAPTOTAL=$(free -m | head -n 3 | tail -n 1 | awk {'print $2'});
# TODO - Execute curl command once per day via cron, cat file here
@xvitaly
xvitaly / remove_crw.cmd
Last active July 21, 2024 21:01
Remove telemetry updates for Windows 7 and 8.1
@echo off
echo Uninstalling KB3075249 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart
echo Uninstalling KB3080149 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3080149 /quiet /norestart
echo Uninstalling KB3021917 (telemetry for Win7)
start /w wusa.exe /uninstall /kb:3021917 /quiet /norestart
echo Uninstalling KB3022345 (telemetry)
start /w wusa.exe /uninstall /kb:3022345 /quiet /norestart
echo Uninstalling KB3068708 (telemetry)
- I see some mods unfairly blamed for crashes or crashes that have missing mod assignments?
Sometimes we can't get full and/or valid information about package sources. Mod identification will never be fully reliable. That's why we have labels like "likely involved mods".
Here are common causes:
1. Due to few coremod's magic (like NEI), built-in mechanism of finding class source can sometimes fail (though in newer versions of OpenEye we use more reliable method).
2. Mod includes API classes. STOP THAT, it's not needed. If you include other mods' APIs you may be blamed for crashes in that part of code. Use @Optional.* and correct build process.
3. Stacktrace contains class from shared library. Every mod that includes this class will be marked as possible candidate.
3. Mod failed on startup (i.e. is in 'errored' state). When multiple mods crash on startup, only one exception is logged (FML limitation). We can retrieve information list about other mods that failed to initialize, but not stacktrace.
4. Crash has
@tinogomes
tinogomes / start_stop_memcached_script.sh
Created June 21, 2010 17:34
Script sample to start/stop for linux with nohup
#!/bin/bash
#
BASE=/tmp
PID=$BASE/app.pid
LOG=$BASE/app.log
ERROR=$BASE/app-error.log
PORT=11211
LISTEN_IP='0.0.0.0'
MEM_SIZE=4