$ sudo apt-get update
$ sudo apt-get install mysql-server
- Note the password you set for the root user during the install.
- After the install is complete, we can start the service:
import { BootScript } from '@mean-expert/boot-script'; | |
import * as Mocha from 'mocha'; | |
import * as fs from 'fs'; | |
import * as path from 'path'; | |
import { FsDirectory } from '../../common/util/fs-directory'; | |
import { stat } from 'fs'; | |
@BootScript() |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style> | |
p01 { color: white; background-color: #FF0000; font-weight: bold; } | |
p02 { color: white; background-color: #FF2A00; font-weight: bold; } | |
p03 { color: black; background-color: #FF5B00; font-weight: bold; } | |
p04 { color: black; background-color: #FF9000; font-weight: bold; } |
"use strict"; | |
function EventEmitter() { | |
this.events = {}; | |
} | |
EventEmitter.prototype = { | |
constructor: EventEmitter, | |
listeners: function(event) { |
// first of all make sure we have enough arguments (exit if not) | |
if (process.argv.length != 5) | |
{ | |
console.error("Usage: node csv2html.js input.csv template.ejs output.html") | |
console.error(); | |
console.error("Outputs the given template for each row in the given input.") | |
console.error("Uses the first row of the CSV as column names in the template.") | |
process.exit(1); | |
} |
// Slider: https://github.com/seiyria/bootstrap-slider | |
// When $(element).slider() is already defined by jQuery UI | |
// we use the alternative binding $(element).bootstrapSlider() | |
ko.bindingHandlers.sliderValue = { | |
init: function (element, valueAccessor, allBindings, viewModel, bindingContext) { | |
var params = valueAccessor(); | |
var slider = $.fn.slider ? 'bootstrapSlider' : 'slider'; |
public static class DateTimeExtensions | |
{ | |
#region Add/Diff Weekdays | |
// Transformed for SQL which numbers Mon=0 and Sun=6 | |
// 0123444401233334012222340111123400012345001234550 | |
private static readonly int[,] _addOffset = | |
{ | |
// 0 1 2 3 4 |
public static class SystemTime | |
{ | |
public static Func<DateTime> DateProvider = () => DateTime.Now; | |
public static void Reset() { DateProvider = () => DateTime.Now; } | |
public static DateTime Now { get { return DateProvider(); } } | |
} |
# Add to your ~/.profile or ~/.bashrc file ... | |
# Use in Windows bash to cd to a Windows directory path containing backslashes. | |
wcdfn() { | |
if [ -z "$1" ] | |
then | |
echo "wcd <windows-path>" 2>&1; | |
else | |
#cd `echo "/$1" | sed -e 's,\\\\,/,g' -e 's/://' ` | |
cd `cygpath -u "$1"` |
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using FluentMigrator; | |
using FluentMigrator.Model; | |
using FluentMigrator.SchemaDump.SchemaWriters; |