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
//delete folder terminal | |
git rm -rf [folder] | |
//show hidden files in finder | |
CMD + SHIFT + . | |
//view one or more file contents | |
cat [file1.ext] [file2.ext] | |
//tail logs (get only the tail end of log file) |
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
//cli | |
//cognito | |
--create a user | |
aws cognito-idp sign-up \ | |
--region REGION \ | |
--client-id APP_CLIENTID \ | |
--username APPUSERNAME/EMAIL \ | |
--password PASSWORD |
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
//create a new repository on the command line | |
git init | |
git add README.md | |
git commit -m "first commit" | |
git remote add origin https://github.com/OndeVai/temp-docker-microservices.git | |
git push -u origin master | |
//push an existing repository from the command line | |
git remote add origin https://github.com/OndeVai/temp-docker-microservices.git |
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
Install | |
--Mac: use homebrew | |
Running | |
--1: Run the server (terminal) - mongod --dbpath /Users/[some path] (dbpath needed for Mac becuase can't access /data/be) | |
Node Client | |
--for an API you have the choice over Mongoose (a more complex but structured "ORM") or mongodb native (more like the CLI) | |
--https://www.npmjs.com/package/mongoose | |
--https://www.npmjs.com/package/mongodb |
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
//common docker issues | |
http://www.pogsdotnet.com/2018/08/common-nodejs-docker-issues.html | |
//List all containers (only IDs) | |
docker ps -aq. | |
//Stop all running containers. | |
docker stop $(docker ps -aq) -f //-f is force and optional | |
//Remove all containers. |
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 skip = (pageNumber - 1) * pageSize; | |
return | |
_context.Authors | |
.OrderBy(a => a.FirstName) | |
.ThenBy(a => a.LastName) | |
.Skip(skip) | |
.Take(pageSize) | |
.ToList(); |
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
USE [PMROEM_Sitefinity] | |
GO | |
/****** Object: StoredProcedure [dbo].[FindGUID] Script Date: 11/15/2017 2:57:58 PM ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE PROCEDURE [dbo].[FindGUID] @searchValue uniqueidentifier AS | |
/* |
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 getWatchers = function (element) { | |
// convert to a jqLite/jQuery element | |
// angular.element is idempotent | |
var el = angular.element( | |
// defaults to the body element | |
element || document.getElementsByTagName('body') | |
) | |
// extract the DOM element data | |
, elData = el.data() | |
// initalize returned watchers array |
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
Helper = new HtmlHelper<T>(new ViewContext(controllerContext, new FakeView(), viewData, tempData, System.IO.TextWriter.Null), new ViewPage()); |
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 exp = ExpressionHelper.GetExpressionText(expression); | |
Html.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName(_ExpressionText) |
NewerOlder