git remote prune origin --dry-run
git remote prune origin
// Step-1: | |
// create a script server file at the project root e.g. server.js | |
const path = require('path'); | |
const express = require('express'); | |
const app = express(); | |
const port = process.env.PORT || 3000; | |
const publicPath = path.join(__dirname, 'build'); | |
// serve the build folder |
import 'package:flutter/widgets.dart'; | |
/// Conditionally wrap a subtree with a parent widget without breaking the code tree. | |
/// | |
/// [condition]: the condition depending on which the subtree [child] is wrapped with the parent. | |
/// [child]: The subtree that should always be build. | |
/// [conditionalBuilder]: builds the parent with the subtree [child]. | |
/// | |
/// ___________ | |
/// Usage: |
/** | |
* A pure version of Array.prototype.splice | |
* It will return a new array rather than mutate the array | |
* See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | |
* @param {Array} array The target array | |
* @param {number} start Index at which to start changing the array | |
* @param {number} deleteCount An integer indicating the number of old array elements to remove | |
* @param {any} items The elements to add to the array, beginning at the start index | |
* @returns {Array} | |
*/ |
Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.
This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.
/** | |
* Copyright (c) 2016, Tiernan Cridland | |
* | |
* Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby | |
* granted, provided that the above copyright notice and this permission notice appear in all copies. | |
* | |
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL | |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
#!/bin/sh | |
# Redirect output to stderr. | |
exec 1>&2 | |
# enable user input | |
exec < /dev/tty | |
consoleregexp='console.log' | |
# CHECK | |
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0 | |
then |
RedirectMatch ^/subdomain/(.*)$ http://subdomain.mysite.com/$1 |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |