This file contains hidden or 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
import pushToDataLayer from 'fe-helper'; | |
export default function track(Component) { | |
return (props) => { | |
const trackers = props.trackEvents.reduce((trackers, eventName) => { | |
trackers[eventName] = (...args) => { | |
pushToDataLayer({ event: event }); | |
if (typeof props[eventName] !== 'undefined') { | |
return props[eventName](...args); | |
} |
This file contains hidden or 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
# https://discussions.apple.com/message/12448781 | |
defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 0 | |
defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 1 | |
killall blued | |
launchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist | |
launchctl load /System/Library/LaunchDaemons/com.apple.blued.plist | |
launchctl start com.apple.blued |
This file contains hidden or 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 | |
# Creates animated gif images from video files by splicing a section out of the video file at the given framerate | |
# and dimensions using ffmpeg, gifscile and imagemagick. | |
# video gif start_time duration framerate [width height] | |
if [ -z "$4" ] || [ "$1" == "-h" ] || [ "$1" == "--help" ]; then | |
echo "Usage: `basename $0` in_file out_file start_time duration out_framerate [width height]" | |
echo |
This file contains hidden or 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 | |
if [ -z "$1" ]; then | |
read -p "No file specified, would you like to download the latest version? (Y/n)" PROMPT | |
if [ "$PROMPT" == "n" ]; then | |
echo "Will not download update." | |
exit | |
fi | |
URL="http://download.cyanogenmod.org`curl -L http://download.cyanogenmod.org/\?type\=snapshot\&device\=hammerhead 2>/dev/null | perl -wlne 'print $1 if /<a href="(\/get\/jenkins\/\d+\/[^"]+\.zip)">/i' | head -n1`" | |
FILENAME=`basename $URL` |
This file contains hidden or 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 | |
if [ -z "$2" ]; then | |
echo "Usage: `basename $0` XPATH FILE" | |
exit 1 | |
fi | |
# For terminal output colourise it too, but for file output just tidy it up | |
if [ -t 1 ]; then | |
xmllint --xpath "$1" $2 | tidy -indent -xml -q | pygmentize -lxml |
NewerOlder