FROM node:6.9
MAINTAINER jairofdezvega@gmail.com
LABEL authors="Jairo Fdez <jairofdezvega@gmail.com>"
## prepare a user which runs everything locally! - required in child images!
RUN useradd --user-group --create-home --shell /bin/false app
ENV HOME=/usr/src/app
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
# Clean the exited containers | |
docker rm $(sudo docker ps -a | grep Exit | cut -d ' ' -f 1) | |
# Clean the untagged images (or old images) | |
docker rmi $(docker images | tail -n +2 | awk '$1 == "<none>" {print $'3'}') | |
# On Docker 1.9+ you can remove the orphan volumes with the next command | |
docker volume rm $(docker volume ls -qf dangling=true) |
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
## -ConfigurationTypeName: Nombre con el namespace de la configuración | |
Add-Migration MYMIGRATION -ConfigurationTypeName CORE.PrincipalMigrations.Configuration | |
Update-Database -ConfigurationTypeName CORE_API.PrincipalMigrations.Configuration |
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
(function () { | |
if (!console) { | |
console = {}; | |
} | |
var old = console.log; | |
var logger = document.getElementById('log'); | |
console.log = function (message) { | |
if (typeof message == 'object') { | |
logger.innerHTML += (JSON && JSON.stringify ? JSON.stringify(message) : String(message)) + '<br />'; | |
} else { |
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
Show hidden characters
# tslint.json | |
{ | |
"extends": "tslint:latest", | |
"rules": { | |
"directive-selector-prefix": [false, "sg"], | |
"component-selector-prefix": [false, "sg"], | |
"pipe-naming": [false, "camelCase", "sg"], | |
"directive-selector-name": [true, "camelCase"], | |
"component-selector-name": [true, "kebab-case"], | |
"directive-selector-type": [true, "attribute"], |
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
EXEC sys.xp_cmdshell '%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe Invoke-RestMethod -Uri http://google.com -Method Get' |
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
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | |
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /> | |
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" /> | |
.... | |
<PropertyGroup> | |
<RestorePackages>true</RestorePackages> | |
</PropertyGroup> | |
<Import Project="$(MSBuildProjectDirectory)\..\.nuget\NuGet.targets" /> | |
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | |
<PropertyGroup> |
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 Sinco = function(){}; | |
function ObserverList(){ | |
this.observerList = []; | |
} | |
ObserverList.prototype.add = function(obj){ | |
return this.observerList.push(obj); | |
}; |
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
touch F{1..9} "Crea los ficheros desde el 1 hasta el 9" | |
Ejemplo: F1 F2 F3 F4 F5 F6 F7 F8 F9 | |
touch F{1..100} "Crea los ficheros desde el 1 hasta el 100" | |
Ejemplo: F1 F2 F3 F4 F5 F6 F7 F8 F9...F100 | |
touch F{a..z} "Crea los ficheros desde la a hasta la z" | |
Ejemplo: Fa Fb Fc Fe...Fz | |
mkdir D{1..9} "Crea los directorios desde el 1 hasta el 9" | |
Ejemplo: D1 D2 D3 D4 D5 D6 D7 D8 D9 | |
mkdir D{1..100} "Crea los directorios desde el 1 hasta el 100" |
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 Task = function(data){ | |
this.name = data.name; | |
this.completed = false; | |
} | |
Task.prototype.complete = function(){ | |
console.log('Completed task: ' + this.name); | |
this.completed = true; | |
} |