Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
######################### | |
# .gitignore file for Xcode4 and Xcode5 Source projects | |
# | |
# Apple bugs, waiting for Apple to fix/respond: | |
# | |
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
# | |
# Version 2.6 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# |
First we'll update your local master
branch. Go to your local project and check out the branch you want to merge into (your local master
branch)
$ git checkout master
Fetch the remote, bringing the branches and their commits from the remote repository.
You can use the -p
, --prune
option to delete any remote-tracking references that no longer exist in the remote. Commits to master
will be stored in a local branch, remotes/origin/master
.
#!/usr/bin/env ruby | |
# | |
# CLI tool for locating and removing a Homebrew installation | |
# http://brew.sh/ | |
# | |
# Copyright (C) 2014 Stephen C. Benner | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or |
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) | |
{ | |
NSRunLoop * runLoop; | |
CLIMain * main; // replace with desired class | |
@autoreleasepool | |
{ | |
// create run loop |
#include <array> | |
#include <functional> | |
template <typename... T> | |
using common_type_t = typename std::common_type<T...>::type; | |
template <typename T> | |
using remove_cv_t = typename std::remove_cv<T>::type; | |
template <bool, typename T, typename... U> |
#include <iostream> | |
#include <iomanip> | |
// | |
// Utilities | |
// | |
// RETURNS() is used to avoid writing boilerplate "->decltype(x) { return x; }" phrases. | |
// | |
// USAGE: auto function(<arguments>) RETURNS(<some-expression>); | |
// |
Note: the original location of this article is on my blog, however, it is posted here too for better readability.
In this article, we will see how to use Core Data for accessing your API. We will use the Bandcamp API as our running example. I've only been experimenting with this code for a few days, so there might be mistakes in there.
The goal of this document is to provide a comprehensive view of what value subtyping might look like in Swift and demonstrate how generalized enums play a significant role in this future.
Note: All syntax used in this document that is not currently valid Swift syntax is only intended to serve the purpose of demonstrating ideas and to serve as a point of reference for future proposals. The intent is not to propose that this exact syntax be used.
Acknowledgement: some of the ideas in this document have been inspired by Niko Matsakis' blog post exploring similar ideas in the context of Rust: http://smallcultfollowing.com/babysteps/blog/2015/08/20/virtual-structs-part-3-bringing-enums-and-structs-together/
//disable TOC button | |
window.HelpViewer.showTOCButton(false); | |
//enable TOC button | |
//If you call this on window load it will flash active for a brief second and then disable again. | |
//Call if after a delay of 250ms and is works fine | |
//Not sure what the second variable does yet, but passing false works fine | |
window.HelpViewer.showTOCButton( true, false, function() { | |
//do something to toggle TOC in your webpage | |
}); |