Skip to content

Instantly share code, notes, and snippets.

View mipmip's full-sized avatar
🐟

Pim Snel mipmip

🐟
View GitHub Profile
@kujiy
kujiy / zabbix-curl.conf
Created March 1, 2017 00:52
Zabbix external script with curl; monitoring external websites
# How to use
# Add an item on zabbix-web admin
# curl[example.com]
#
# Test command on zabbix-server
# [root@zabbix /]# zabbix_get -s 192.168.20.212 -k "curl[example.com]"
UserParameter=curl[*],curl -sI $1 | grep -q "HTTP/1.1 200 OK" && [[ $? == 0 ]] && echo 0 || echo 1
@maciekish
maciekish / Anet+A6_settings.inst.cfg
Last active September 21, 2024 10:47
Anet A6 profile for Cura 3.5. Start Cura once, create a custom printer called "Anet A6" without changing any of the settings and close Cura. Save and overwrite both files in "AppData\Roaming\cura\3.1\definition_changes" and start Cura again.
[general]
version = 4
name = Anet A6_settings
definition = custom
[metadata]
setting_version = 5
type = definition_changes
[values]
@rubenerd
rubenerd / adobe-cc-mac-uninstall.sh
Created August 31, 2015 00:01
Remove Adobe Creative Cloud from OS X
#!/bin/sh
rm -rf "/Applications/Adobe*"
rm -rf "~/Library/Application Support/Adobe/"
rm -rf "~/Library/Caches/Adobe*/"
sudo rm -rf "/Applications/Utilities/Adobe*"
sudo rm -rf "/Library/Application Support/Adobe/"
sudo rm -rf "/Users/Shared/Adobe/"
@spacepluk
spacepluk / gnowesome.dconf
Last active February 11, 2025 18:10
awesome-ish key bindings for gnome-shell
[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0]
binding='<Super>Return'
command='urxvtc'
name='Open Terminal'
[org/gnome/desktop/wm/preferences]
action-middle-click-titlebar='none'
mouse-button-modifier='<Super>'
num-workspaces=9
@waja
waja / free_unused_loop_dev.sh
Last active September 30, 2022 12:37
Remove unused loop devices
#!/bin/sh
for LOOPS in $(losetup -a | awk -F':' {'print $1'} | awk -F'/' {'print $3'}); do
for LOOPPART in $(ls /dev/mapper/${LOOPS}*| awk -F'/' {'print $4'}); do
dmsetup remove ${LOOPPART};
done;
losetup -d /dev/${LOOPS};
done
@Newbrict
Newbrict / ascii cube
Created March 26, 2014 16:56
an ASCII art Cube
cubes look like this:
e-------f
/| /|
/ | / |
a--|----b |
| g----|--h
| / | /
c-------d
@diramazioni
diramazioni / texture_change.py
Created February 27, 2014 17:54
blender python: texture change from command line
'''
texture image path are relative to the blend file directory. run from command line like this:
texture=img/2012720989_c.jpg blender -b mug.blend --python texture_change.py -F PNG -s 1 -e 1 -j 1 -t 0 -a
''''
import os
image_file = os.getenv('texture')
if not image_file:
image_file="img/2012720989_c.jpg"
@thitemple
thitemple / dev_setup.ps1
Last active November 12, 2024 15:00
A PowerShell script for installing a dev machine using Chocolatey.
function Add-Path() {
[Cmdletbinding()]
param([parameter(Mandatory=$True,ValueFromPipeline=$True,Position=0)][String[]]$AddedFolder)
# Get the current search path from the environment keys in the registry.
$OldPath=(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path
# See if a new folder has been supplied.
if (!$AddedFolder) {
Return 'No Folder Supplied. $ENV:PATH Unchanged'
}
# See if the new folder exists on the file system.
@todgru
todgru / starttmux.sh
Last active September 26, 2024 04:28
Start up tmux with custom windows, panes and applications running
#!/bin/sh
#
# Setup a work space called `work` with two windows
# first window has 3 panes.
# The first pane set at 65%, split horizontally, set to api root and running vim
# pane 2 is split at 25% and running redis-server
# pane 3 is set to api root and bash prompt.
# note: `api` aliased to `cd ~/path/to/work`
#
session="work"
@paulodeleo
paulodeleo / .tmux.conf
Last active July 15, 2022 10:16
Tmux configuration to enable mouse scroll and mouse panel select, taken from: http://brainscraps.wikia.com/wiki/Extreme_Multitasking_with_tmux_and_PuTTY
# Make mouse useful in copy mode
setw -g mode-mouse on
# Allow mouse to select which pane to use
set -g mouse-select-pane on
# Allow mouse dragging to resize panes
set -g mouse-resize-pane on
# Allow mouse to select windows