Current version: 1.0.15 (as of last document update)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This function will echo text centered horizontally within the shell window. | |
echo_centered () { | |
# The character to be used as left/right filler. | |
if [[ -n "$2" ]]; then | |
FILLER="$2" | |
else | |
FILLER="=" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://github.com/jacobsalmela | |
# Enables outbound SSH in single-user mode on OS X | |
# Save this file as /var/root/.profile and boot into single-user mode | |
# Last tested on 10.9.2 | |
#----------VARIABLES--------- | |
# Manually set ethernet device ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# check_freak.sh | |
# (c) 2015 Martin Seener | |
# Simple script which checks SSL/TLS services for the FREAK vulnerability (CVE 2015-0204) | |
# It will output if the checked host is vulnerable and returns the right exit code | |
# so it can also be used as a nagios check! | |
PROGNAME=$(basename $0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import ctypes, ctypes.util | |
# Import CoreGraphics as a C library, so we can call some private functions | |
c_CoreGraphics = ctypes.CDLL(ctypes.util.find_library('CoreGraphics')) | |
def disable_beam_sync(doDisable): | |
if doDisable: | |
# Disabling beam sync: | |
# 1st: Enable Quartz debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bash function to get yes/no feed back from the user (return is considered no here) | |
agree() { | |
local question="$1" | |
while true; do | |
read -p "$question " answer | |
case $answer in | |
[Yy]|[Yy][Ee][Ss]) return 0 ;; | |
[Nn]|[Nn][Oo]|'') return 1 ;; # empty string is default | |
*) echo "Please answer yes or no.";; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# As written, this requires the following: | |
# - OS X 10.6+ (tested on 10.12.6 and 10.14.3) | |
# - python 2.6 or 2.7 (for collections.namedtuple usage, should be fine as default python in 10.6 is 2.6) | |
# - pyObjC (as such, recommended to be used with native OS X python install) | |
# Run with root | |
import objc, ctypes.util, os.path, collections |
OlderNewer