Skip to content

Instantly share code, notes, and snippets.

@kayheunen
kayheunen / zendesk-chat-custom-button-toggle.js
Created February 14, 2017 08:19
Zendesk Chat - Toggle custom chat button on availability of team
var all_departments;
var department;
var $custom_button_chat = $('.help-widget .chat');
// map url to chat departments
var url_path = window.location.pathname.split( '/' );
var languages = {
'en-gb' : 'ENGLISH',
'nl' : 'DUTCH',
'de' : 'GERMAN',
@kayheunen
kayheunen / Terminal commands
Created October 24, 2013 11:37
Remove Dashboard from Mac OS X Mavericks
# Run in terminal
defaults write com.apple.dashboard mcx-disabled -boolean true
# Then reload the dock
killall Dock
@kayheunen
kayheunen / AppleScript Reconnect WiFi
Last active November 2, 2019 17:46
AppleScript to Restart WiFi connection, in order to connect to closest AP in your network.
on run
try
set airport_status to do shell script "networksetup -getairportpower en1"
on error
display dialog "The script did't work, please check the 'networksetup' command (in terminal) works on your system. " buttons {"kthxbai"}
end try
if airport_status is "Wi-Fi Power (en1): On" then
do shell script "networksetup -setairportpower en1 off"
do shell script "networksetup -setairportpower en1 on"