Skip to content

Instantly share code, notes, and snippets.

@ppp0
ppp0 / removeGreppedCerts
Last active August 29, 2015 14:02
Selectively remove puppet master certificates
#!/bin/bash
nodeList=''
grepNodes() {
read -p "$1"": " val
nodeList=$(puppet cert list --all | grep $val | sed -r 's/.*"(.+\.)+([a-z0-9\-]+)".*/\1\2/');
}
ask() {
read -p "$1 ([y]es or [N]o): "
@ppp0
ppp0 / gist:5755196
Created June 11, 2013 08:08
Find pseudo-cores and disable them (linux)
#!/bin/bash
# Find out which CPUs are real
CPUS_TO_SKIP=" $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | sed 's/[^0-9].*//' | sort | uniq | tr "\r\n" " ") "
# Disable Hyperthreading
for CPU_PATH in /sys/devices/system/cpu/cpu[0-9]*; do
CPU="$(echo $CPU_PATH | tr -cd "0-9")"
echo "$CPUS_TO_SKIP" | grep " $CPU " > /dev/null
if [ $? -ne 0 ]; then
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@dideler
dideler / bootstrapping.md
Last active May 8, 2024 14:38
Bootstrapping - a list of useful resources to get up and running quickly

Welcome!

UPDATE: This list is no longer maintained. I've moved it to its own repo so you can send suggestions as Pull Requests. https://github.com/dideler/bootstrapping/

For feedback or suggestions, please send a tweet (@dideler). Gist comments don't notify me. Pull requests aren't possible with gists (yet), so I don't recommend forking because then I can't easily get the change.

Starring this gist will give me an idea of how many people consider this list useful.