This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html ng-app="project"> | |
| <head> | |
| <title>Angular: Service example</title> | |
| <script src="http://code.angularjs.org/angular-1.0.1.js"></script> | |
| <script> | |
| var projectModule = angular.module('project',[]); | |
| projectModule.factory('theService', function() { | |
| return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <!-- https://html2canvas.hertzen.com/ --> | |
| <script src="html2canvas.min.js"></script> | |
| <script> | |
| function previewFile() { | |
| const preview = document.querySelector('#client-image'); | |
| const file = document.querySelector('input[type=file]').files[0]; | |
| const reader = new FileReader(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| On server | |
| ----------------- | |
| # make a git repo | |
| $ mkdir /path/to/repo.git | |
| $ cd /path/to/repo.git | |
| $ git init --bare | |
| # make a post-receive hook | |
| # see the post-receive file in this Gist | |
| # if you're using Node.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // A basic template for Angular directives | |
| // that work with other directives. | |
| 'use strict'; | |
| angular.module('ModuleName.directives') | |
| .directive('myDirective', ['$timeout', 'serviceDependency', | |
| function ($timeout, serviceDependency) { | |
| // Directives accept dependencies in the typical | |
| // Angular way. Be aware that you cannot put | |
| // $scope or $element above -- they belong either |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html ng-app="project"> | |
| <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script> | |
| <script> | |
| // Create your module | |
| var dependencies = []; | |
| var app = angular.module('project', dependencies); | |
| // Create a 'defaults' service | |
| app.value("defaults", /* your server-side JSON here */); | |
| // e.g. { whatever: 'some default text' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Place in '${chromeProfilePath}\User StyleSheets\Custom.css' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Instructions: https://github.com/jimeh/git-aware-prompt | |
| # Also see: http://www.ibm.com/developerworks/linux/library/l-tip-prompt/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :-) |
NewerOlder