Skip to content

Instantly share code, notes, and snippets.

View prwhite's full-sized avatar

Payton White prwhite

View GitHub Profile
@socantre
socantre / CMakeLists.txt
Created August 24, 2015 03:45
Example of using add_custom_command and add_custom_target together in CMake to handle custom build steps with minimal rebuilding: This example untars library headers for an INTERFACE library target
set(LIBFOO_TAR_HEADERS
"${CMAKE_CURRENT_BINARY_DIR}/include/foo/foo.h"
"${CMAKE_CURRENT_BINARY_DIR}/include/foo/foo_utils.h"
)
add_custom_command(OUTPUT ${LIBFOO_TAR_HEADERS}
COMMAND ${CMAKE_COMMAND} -E tar xzf "${CMAKE_CURRENT_SOURCE_DIR}/libfoo/foo.tar"
COMMAND ${CMAKE_COMMAND} -E touch ${LIBFOO_TAR_HEADERS}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/include/foo"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/libfoo/foo.tar"
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 27, 2024 06:33
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@anthonyherron
anthonyherron / ThreeFinderGesturesBackInXcode.txt
Created August 8, 2011 15:53
Enable 3 finger swipe to switch between .h & .m in Xcode
Three finger gestures are awesome in Xcode, but they disappeared in Lion :(
You can bring them back to life however...
Inspired by a post from @gordonhughes (http://geeksinkilts.com/?p=67), explaining how to bring them back on an external trackpad, I started digging around for a way to get it working on the internal trackpads for the mbp/mba models.
*edit*
Perhaps an easier way of doing this found by @gordonhughes again is just this 1 line in Terminal, haven't confirmed this yet though
defaults -currentHost write -g "com.apple.trackpad.threeFingerVertSwipeGesture" -int 1