Skip to content

Instantly share code, notes, and snippets.

@GambitK
GambitK / zabbix_agent_installation.ps1
Created January 24, 2018 15:25
Zabbix powershell remote script
# ===========================================================================================
#
# NAME: Zabbix_InstallAgent.ps1
#
# AUTHOR: Pierre-Emmanuel Turcotte,
# DATE : 2012-11-05
#
# COMMENT: Remote installation of Zabbix agent from central location.
#
# The zabbix source folder is a folder containing subfolder corresponding to the
@pjbriggs
pjbriggs / proftpd.conf-extract
Last active January 19, 2016 05:23
Extract from proftpd.conf for handling SHA1 and PBKDF2 encryption
ServerName "Galaxy FTP File Upload"
ServerType standalone
DefaultServer on
PidFile /var/run/proftpd/proftpd-galaxy.pid
# Port 21 is the standard FTP port.
Port 21
# Don't use IPv6 support by default.
UseIPv6 off
#!/bin/bash
#
# see https://stribika.github.io/2015/01/04/secure-secure-shell.html
SSHD_VERSION=`/usr/sbin/sshd -v 2>&1 | grep OpenSSH | cut -d " " -f1 | cut -d "_" -f2 | cut -d"." -f2 | cut -d"p" -f1`
cat /etc/ssh/sshd_config | grep -v "KexAlgorithms" | grep -v "Ciphers" | grep -v "MACs" | grep -v "github.com" > /etc/ssh/sshd_config.new
cat /etc/ssh/ssh_config | grep -v "KexAlgorithms" | grep -v "Ciphers" | grep -v "MACs" | grep -v "github.com" > /etc/ssh/ssh_config.new
if [ "${SSHD_VERSION}" != "0" ]; then
# better algorithms only available on newer OpenSSH versions
echo "KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256" >> /etc/ssh/sshd_config.new
@jbweber
jbweber / aptly.sh
Created December 4, 2014 05:24
aptly script
#!/bin/bash
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
# Authored by Yazz D. Atlas <yazz.atlas@hp.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
@kwlzn
kwlzn / Makefile
Created May 6, 2014 00:37
uWSGI + pex Makefile
PYTHON := python2.6
BUILD_DIR := buildtmp
AURORA_CLUSTER := test
AURORA_ROLE := $(shell whoami)
UWSGI_VER = 2.0.4
UWSGI_DIR = uwsgi-$(UWSGI_VER)
UWSGI_FILE = $(UWSGI_DIR).tar.gz
UWSGI_URL = http://projects.unbit.it/downloads/$(UWSGI_FILE)
@gmr
gmr / carbon.conf
Created September 4, 2013 14:41
Single graphite box carbon.conf file that spreads load across four cache daemons for increased write performance and cache effectiveness
[cache]
GRAPHITE_STORAGE_DIR = /var/lib/graphite/
GRAPHITE_ROOT = /opt/graphite/
CONF_DIR = /etc/carbon/
LOG_DIR = /var/log/carbon/
PID_DIR = /var/run/carbon/
LOG_UPDATES = False
WHISPER_AUTOFLUSH = True
@cuadue
cuadue / cubism-websockets.html
Created September 3, 2013 17:43
Streaming data to cubism.js with websockets
<!DOCTYPE html>
<meta charset='utf-8'>
<head>
<title>Cubism + Websockets</title>
<script language='javascript' src='d3.min.js'></script>
<script language='javascript' src='cubism.v1.js'></script>
<script language='javascript'>
/* I can never seem to remember:
Array.push() appends to the end, and returns the new length
@SabretWoW
SabretWoW / rspec_model_testing_template.rb
Last active May 28, 2024 17:41
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@cdhunt
cdhunt / Get-CredentialFromWindowsCredentialManager.ps1
Last active June 1, 2023 23:48 — forked from toburger/Get-CredentialFromWindowsCredentialManager.ps1
Gets a PowerShell Credential [PSCredential] from the Windows Credential Manager. This only works for Generic Credentials.
<#
.SYNOPSIS
Gets a PowerShell Credential (PSCredential) from the Windows Credential Manager
.DESCRIPTION
This module will return a [PSCredential] object from a credential stored in Windows Credential Manager. The
Get-StoredCredential function can only access Generic Credentials.
Alias: GSC
@jgeurts
jgeurts / install-graphite-ubuntu-12.04.sh
Created July 14, 2012 16:36 — forked from tkoeppen/install-graphite-ubuntu-10.04.sh
Install Graphite 0.9.10 on Ubuntu 12.04
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
cd
sudo apt-get update
sudo apt-get upgrade