- OS X
- XCode
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
var video = document.querySelector('video'); | |
if (video) { | |
var speedDropdown = document.querySelector('.ytp-drop-down') | |
var range = document.createElement('input'); | |
speedDropdown.style.display = 'none' | |
range.type = 'range'; | |
range.min = '0.5'; | |
range.max = '3.0'; | |
range.step = '0.1'; | |
range.value = '1.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/env bash | |
# a list of all files that are changing with this commit | |
FILES_CHANGING=$(git diff --cached --name-only --diff-filter=ACM) | |
# if there is only one file changing | |
if [ $(echo "$FILES_CHANGING" | wc -l) -eq 1 ]; then | |
# and that file is a readme | |
README_CHANGING=$($FILES_CHANGING | grep -Ei "readme(.md|.txt)?$") |
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
var $results = $('#result_div'); | |
var button = document.createElement('button'); | |
button.className = 'top-button button'; | |
button.innerHTML = 'Zoom'; | |
var toggleZoom = function() { | |
var result_height = $results.attr('data-height'); | |
$('.top-boxes, .resizer').toggle(); |
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 | |
PULL_REQUEST=$(git describe --all --contains $1 | cut -d '~' -f 1) | |
LAST_PULL_REQUEST=$(echo ^$PULL_REQUEST | awk '{sub(/[0-9]+/, substr($0, match($0, /[0-9]+/)) - 1); print }') | |
PULL_REQUEST_NUMBER=$(echo $PULL_REQUEST | awk -F/ '{print $NF}'); | |
echo " | |
$(git config --get remote.origin.url | cut -d '.' -f 1-2)/pull/$PULL_REQUEST_NUMBER | |
" | |
git --no-pager log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative $PULL_REQUEST $LAST_PULL_REQUEST --no-merges |
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 | |
if git rev-parse --verify HEAD >/dev/null 2>&1 ; then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
fi | |
# Find files with trailing whitespace | |
# Doubled commands are _linux_version_ || _mac_osx_version_ |
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
#Block the APNIC range of IP addresses - a common source of hacking attempts | |
sudo ipfw -q add deny src-ip 43.0.0.0/8 | |
sudo ipfw -q add deny src-ip 58.0.0.0/8 | |
sudo ipfw -q add deny src-ip 59.0.0.0/8 | |
sudo ipfw -q add deny src-ip 60.0.0.0/8 | |
sudo ipfw -q add deny src-ip 61.0.0.0/8 | |
sudo ipfw -q add deny src-ip 110.0.0.0/8 | |
sudo ipfw -q add deny src-ip 111.0.0.0/8 | |
sudo ipfw -q add deny src-ip 112.0.0.0/8 |
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
/** | |
* Scrolling shadows by @kizmarh and @leaverou | |
* Only works in browsers supporting background-attachment: local; & CSS gradients | |
* Degrades gracefully | |
*/ | |
html { | |
background: white; | |
font: 120% sans-serif; | |
} |
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
/** | |
* Scrolling shadows by @kizmarh and @leaverou | |
* Only works in browsers supporting background-attachment: local; & CSS gradients | |
* Degrades gracefully | |
*/ | |
html { | |
background: white; | |
font: 120% sans-serif; | |
} |
This file has been truncated, but you can view the full file.
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
// | |
// jsh | |
// Launch a window for interactively executing JavaScript commands | |
// | |
// $Id$ | |
// Copyright: (c)2007, xbytor | |
// License: http://www.opensource.org/licenses/bsd-license.php | |
// Contact: [email protected] | |
// | |
app; |