This file contains 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
<div class="row"> | |
<div class="col-2"></div> | |
<div class="col-7"></div> | |
<div class="col-3"></div> | |
</div> |
This file contains 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
# Add new line at the end of the file | |
for file in chapters/* | |
do | |
if [ -s "$file" ] && [ "$(tail -c1 "$file"; echo x)" != $'\nx' ]; then | |
echo "" >>"$file" | |
fi | |
done |
This file contains 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
{ | |
"trailingComma": "es5", | |
"tabWidth": 2, | |
"semi": true, | |
"singleQuote": true, | |
"useTabs": false, | |
"arrowParens": "always" | |
} |
This file contains 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
.config(function($stateProvider, $urlRouterProvider) { | |
// | |
// For any unmatched url, redirect to /state1 | |
$urlRouterProvider.otherwise("/state1"); | |
// | |
// Now set up the states | |
$stateProvider | |
.state('state1', { | |
url: "/state1", | |
templateUrl: "partials/state1.html" |
This file contains 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
<div class="container" ng-controller="HeaderController"> | |
<h1>This is my demo ui-router app.</h1> | |
<div class="navbar"> | |
<a class="navbar-brand" href="#">ui-router</a> | |
<ul class="nav navbar-nav"> | |
<li class="active"> | |
<a ng-class="getClass('/state1')" ui-sref="state1">State1</a> | |
</li> | |
<li> | |
<a ng-class="getClass('/state2')" ui-sref="state2">State2</a> |
This file contains 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
//Watching screen resolution changes to render different divs. | |
$scope.$watch(function(){ | |
return window.innerWidth; | |
}, function(newValue) { | |
if(newValue < 767){ | |
$rootScope.renderMobileView = true; | |
} | |
else{ | |
$rootScope.renderMobileView = false; |
This file contains 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
<script type="text/javascript"> | |
$( document ).ready(function() { | |
if(window.location.href=="http://181.224.139.66/~enligh07/nams/#home" || window.location.href=="http://181.224.139.66/~enligh07/nams/#services" || window.location.href=="http://181.224.139.66/~enligh07/nams/#journal" || window.location.href=="http://181.224.139.66/~enligh07/nams/#contact"){ | |
setTimeout(function(){ | |
window.location.href = window.location.href; | |
}, 200); | |
This file contains 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 dummy function that callback after 1 second (simulating some processing work) | |
function dummy(i, callback) { | |
setTimeout(function() { | |
// After 1 second, we callback with a result | |
callback('slow result') | |
}, 1000); | |
} | |
// Incorrect version |
This file contains 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
var app = angular.module('angularPostPHP', []); | |
app.controller('loginCtrl', function ($scope, $http) { | |
$scope.login = function () { | |
var request = $http({ | |
method: "post", | |
url: "login.php", | |
data: { |
This file contains 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
git init | |
git status | |
git add | |
git commit | |
git log | |
.gitignore files | |
git branch | |
git checkout | |
gitk | |
git remote add origin {url} |
NewerOlder