Skip to content

Instantly share code, notes, and snippets.

Avatar

Stefan stefanschmidt

View GitHub Profile
@stefanschmidt
stefanschmidt / daily-show-downloader.sh
Last active Feb 21, 2017 — forked from anonymous/gist:276271
The Daily Show Downloader
View daily-show-downloader.sh
#!/bin/bash
#
# This script depends on curl and rtmpdump.
# For playback I recommend mplayer.
# Suggestions are welcome.
#
RTMPDUMP="rtmpdump" # the name of the binary
set -eu
View vimeo-downlaoder.sh
#!/bin/sh
#
# Vimeo Downloader
#
# Copyright (C) 2008, 2010 Denver Gingerich
# Copyright (C) 2009 Jori Hamalainen
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
@stefanschmidt
stefanschmidt / remote-management.sh
Last active Oct 3, 2015
Enable Remote Management on OS X
View remote-management.sh
# Configure Remote Management
kickstart -configure -allowAccessFor -allUsers -privs -all
# Enable Remote Management
kickstart -activate -restart -agent
# Disable Remote Management
kickstart -deactivate -stop
@stefanschmidt
stefanschmidt / toggle-screen-sharing
Last active May 18, 2020
Enable/Disable Screen Sharing on OSX
View toggle-screen-sharing
# Enable Screen Sharing
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist
# Disable Screen Sharing
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.screensharing.plist
@stefanschmidt
stefanschmidt / mountain-lion.sh
Last active Oct 7, 2015 — forked from AriX/mountainlion.sh
Script to check for Mac OS X 10.8 Mountain Lion
View mountain-lion.sh
#!/bin/bash
USER_AGENT="iMacAppStore/1.0.1 (Macintosh; U; Intel Mac OS X 10.6.7; en) AppleWebKit/533.20.25"
STORE_URL="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewMultiRoom?fcId=489264329&mt=12&s=143461"
SEARCH_STRING="mountain lion"
clear; echo -n "Waiting for Mountain Lion"
while true; do
if curl -sA "$USER_AGENT" "$STORE_URL" | grep -i "$SEARCH_STRING" > /dev/null; then
@stefanschmidt
stefanschmidt / enable_chrome_third_party
Last active Dec 11, 2015
Permanently enable installation of Chrome extensions from arbitrary third-party sources
View enable_chrome_third_party
defaults write com.google.Chrome ExtensionInstallSources -array '"<all_urls>"'
@stefanschmidt
stefanschmidt / osx-safari-flash-update-v1.sh
Last active Sep 8, 2017
Update the Flash Player on OS X via CLI
View osx-safari-flash-update-v1.sh
# Check here for the URL of the current release: http://get.adobe.com/de/flashplayer/
curl -O http://fpdownload.macromedia.com/get/flashplayer/current/licensing/mac/install_flash_player_12_osx.dmg
# The -nobrowse prevents the mounted image from showing up in the OS X Finder
hdiutil attach -nobrowse install_flash_player_osx.dmg
# Non-interactive installation
cd /Volumes/Flash\ Player/Install\ Adobe\ Flash\ Player.app/Contents/Resources
sudo installer -verbose -pkg Adobe\ Flash\ Player.pkg -target /
@stefanschmidt
stefanschmidt / Solarized.terminal
Last active Dec 14, 2015
Solarized Colors for Mountain Lion's Terminal.app
View Solarized.terminal
<!-- -->
<!-- See http://ethanschoonover.com/solarized -->
<!-- -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
@stefanschmidt
stefanschmidt / dircolors-solarized
Created Mar 3, 2013
Solarized Colors for GNU dircolors
View dircolors-solarized
#
# Heavily customized version of Sebastian Tramp's dircolors-solarized
# https://github.com/seebi/dircolors-solarized
#
# Below, there should be one TERM entry for each termtype that is colorizable
TERM ansi
TERM color_xterm
TERM color-xterm
TERM con132x25
@stefanschmidt
stefanschmidt / reset-lsdb
Last active Dec 14, 2015
Reset the OS X Launch Service database to remove duplicate menu entries
View reset-lsdb
lsregister -kill -r -v -all local,system,user