Skip to content

Instantly share code, notes, and snippets.


Chris Sanders astericky

View GitHub Profile
epatey /
Last active Feb 13, 2020
Refreshing SwiftUI on changes within objects in a collection.

Refreshing SwiftUI on changes within objects in a collection.

How to approach updating UI for changes within objects held within a collection? After experimenting a bit, I think there are basically two approaches.

  1. The conformance to BindableObject by the object that contains the collection needs to be deep - not shallow. It needs to fire didChange if the collection, or anything recursively within the collection, changes. or
  2. The parent/container can have shallow conformance to BindableObject if the row model themselves conform to BindableObject and the row view declares the dependency with @ObjectBinding.

You must do one or the other if you want a row to refresh when isTyping changes value. I suspect that in the general case, #2 will be simpler.

astericky / webpack.config.js
Last active Mar 3, 2017
Webpack 2 Work Config Example
View webpack.config.js
module.exports = {
entry: {
testname: './index.jsx',
output: {
path: 'path goes here',
filename: '[name].js',
module: {
astericky / webpack.config.js
Created Mar 3, 2017
Webpack 2 Config Example
View webpack.config.js
const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const VENDOR_LIBS = [
'react', 'react-dom', 'react-router', 'react-redux', 'redux', 'redux-thunk', 'lodash'
module.exports = {
JohnAlbin / _init.scss
Last active Dec 26, 2015
Handing IE8 and lower with Breakpoint + compass/support
View _init.scss
// Initialize the Sass variables and partials used in this project.
// Set the legacy IE support variables. We override the default values set by
// the compass/support partial, but let styles-ie8.scss override these values.
$legacy-support-for-ie6 : false !default;
$legacy-support-for-ie7 : false !default; // Note the use of !default.
$legacy-support-for-ie8 : false !default;
// Partials to be shared with all .scss files.
cobyism /
Last active Sep 21, 2020
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

CristinaSolana / gist:1885435
Created Feb 22, 2012
Keeping a fork up to date
View gist:1885435

1. Clone your fork:

git clone

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://
git fetch upstream
You can’t perform that action at this time.