Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
| """ | |
| This is an example on how to reload Flask app in runtime | |
| It can be useful for the use case where you want to enable/disable blueprints/routes dynamically. | |
| To run the app: | |
| > pip install flask & python app.py | |
| Then test it via curl |
Deprecated - DataFire is now out of beta. You can use the new version of this project on DataFire.io, or view it on GitHub
Pulls all new issues from a GitHub repo into a spreadsheet
[metadata]: ./ '{"links":[{"connection":"563b9b84ea9ad5f345e97505","operation":{"method":"get","path":"/repos/{ownerId}/{repoId}/issues"}},{"connection":"563b9b85ea9ad5f345e97511","operation":{"method":"get","path":"/list/{key}/{worksheetId}/{visibility}/{projection}"}},{"connection":"563b9b85ea9ad5f345e97511","operation":{"method":"put","path":"/cells/{key}/{worksheetId}/{visibility}/{projection}/{cellId}"}},{"connection":"563b9b85ea9ad5f345e97511","operation":{"method":"post","path":"/list/{key}/{worksheetId}/{visibility}/{pro
| import Foundation | |
| // Very slightly adapted from http://stackoverflow.com/a/30141700/106244 | |
| // 99.99% Credit to Martin R! | |
| // Mapping from XML/HTML character entity reference to character | |
| // From http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references | |
| private let characterEntities : [String: Character] = [ | |
| // XML predefined entities: |
| directive( 'ignoreMouseWheel', function( $rootScope ) { | |
| return { | |
| restrict: 'A', | |
| link: function( scope, element, attrs ){ | |
| element.bind('mousewheel', function ( event ) { | |
| element.blur(); | |
| } ); | |
| } | |
| } | |
| } ); |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
| //Directive | |
| angularApp.directive('angularOdometer', function () { | |
| return { | |
| restrict: 'A', | |
| link: function(scope, element, attrs) { | |
| //Creates new instance of odometer for the element | |
| new Odometer({el: element[0], value: scope[attrs.odometer]}); | |
| //Watch for changes and update the element value (causing odometer to redraw) |
| USER=rentzsch | |
| PASS=mypassword | |
| REPO=mogenerator | |
| # Delete default labels | |
| curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/bug" | |
| curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/duplicate" | |
| curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/enhancement" | |
| curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/invalid" | |
| curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/question" |
| var user = { | |
| validateCredentials: function (username, password) { | |
| return ( | |
| (!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' } | |
| : (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' } | |
| : (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' } | |
| : (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' } | |
| : (!/^([a-z0-9_-]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' } | |
| : false | |
| ); |
This article is now published on my website: Prefer Subshells for Context.