git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| // | |
| // NSWorkspace+ApplicationForOpeningURL.h | |
| // | |
| // Created by Scott Jackson on 10/07/12. | |
| // Copyright (c) 2012 SJSoftware. All rights reserved. | |
| // | |
| #import <Cocoa/Cocoa.h> | |
| @interface NSWorkspace (ApplicationForOpeningURL) |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| // polyfill window.getMatchedCSSRules() in Chrome | |
| if ( typeof window.getMatchedCSSRules !== 'function' ) { | |
| var ELEMENT_RE = /[\w-]+/g, | |
| ID_RE = /#[\w-]+/g, | |
| CLASS_RE = /\.[\w-]+/g, | |
| ATTR_RE = /\[[^\]]+\]/g, | |
| // :not() pseudo-class does not add to specificity, but its content does as if it was outside it | |
| PSEUDO_CLASSES_RE = /\:(?!not)[\w-]+(\(.*\))?/g, | |
| PSEUDO_ELEMENTS_RE = /\:\:?(after|before|first-letter|first-line|selection)/g; | |
| // convert an array-like object to array |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Micro Stripe Checkout</title> | |
| <meta charSet='utf-8' /> | |
| <meta name='viewport' content='initial-scale=1.0, width=device-width' /> | |
| <script src="https://js.stripe.com/v3/"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> | |
| <style> | |
| * { |
At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)
Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf
example.com, as which we (the git client) connect (push) to exmaple.com.sudo useradd -m -s /usr/bin/git-shell git| import 'package:flutter/material.dart'; | |
| import 'package:simple_inherit/state_container.dart'; | |
| class UpdateUserScreen extends StatelessWidget { | |
| static final GlobalKey<FormState> formKey = new GlobalKey<FormState>(); | |
| static final GlobalKey<FormFieldState<String>> firstNameKey = | |
| new GlobalKey<FormFieldState<String>>(); | |
| static final GlobalKey<FormFieldState<String>> lastNameKey = | |
| new GlobalKey<FormFieldState<String>>(); | |
| static final GlobalKey<FormFieldState<String>> emailKey = |
| ## | |
| # You should look at the following URL's in order to grasp a solid understanding | |
| # of Nginx configuration files in order to fully unleash the power of Nginx. | |
| # http://wiki.nginx.org/Pitfalls | |
| # http://wiki.nginx.org/QuickStart | |
| # http://wiki.nginx.org/Configuration | |
| # | |
| # Generally, you will want to move this file somewhere, and start with a clean | |
| # file but keep this around for reference. Or just disable in sites-enabled. | |
| # |
Zach Caceres
Javascript does not have the typical 'private' and 'public' specifiers of more traditional object oriented languages like C# or Java. However, you can achieve the same effect through the clever application of Javascript's function-level scoping. The Revealing Module pattern is a design pattern for Javascript applications that elegantly solves this problem.
The central principle of the Revealing Module pattern is that all functionality and variables should be hidden unless deliberately exposed.
Let's imagine we have a music application where a musicPlayer.js file handles much of our user's experience. We need to access some methods, but shouldn't be able to mess with other methods or variables.
https://github.com/djvirgen/virgen-acl Simple and elegant, create your own checks. No middleware?
https://github.com/OptimalBits/node_acl Use as middleware, create your own roles and access. Great choice.
https://github.com/tschaub/authorized Similar to connect roles... but a bit more robust? you can create roles and action, and associate many roles with that action