Skip to content

Instantly share code, notes, and snippets.

View jetstreamin's full-sized avatar
:octocat:
chillin' like the vanilla shake that I am

Mike Mahon jetstreamin

:octocat:
chillin' like the vanilla shake that I am
View GitHub Profile
// rm -rf ./build && webpack --config webpack.prod.config.js -p --progress
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ROOT = __dirname;
var PROJECT_ROOT = path.join(ROOT, 'src');
var BUILD_ROOT = path.join(ROOT, 'build');
@jetstreamin
jetstreamin / parse-full-name-from-csv.js
Created July 29, 2016 01:38
this script parses the last, first and middle initial from a single column in a csv file. It uses fast-csv and parse-full-name to do so.
const fs = require("fs");
var csv = require("fast-csv");
var parser = require("parse-full-name").parseFullName;
fs.createReadStream("mydata.csv")
.pipe(csv())
.on("data", function(data){
name = parser(data[0]);
console.log(name.last + ',' + name.first + ',' + name.middle + ',');
})
@jetstreamin
jetstreamin / Jenkins - Update Next Build Number
Created February 3, 2017 00:44
Jenkins - Update Next Build Number
Jenkins.instance.getItemByFullName("YourJobName").updateNextBuildNumber(45)
@jetstreamin
jetstreamin / SQL-OUTPUT-Insert-Update
Created February 6, 2017 20:32
SQL OUTPUT for Inserts & Updates
INSERT INTO [TaskComments] ([TaskId], [CommentId])
OUTPUT INSERTED.TaskId, INSERTED.CommentId, GETDATE() AS 'Created'
VALUES (24, 44)
UPDATE Tasks SET Completed = '02-22-2017' OUTPUT INSERTED.Completed, DELETED.Completed WHERE Id = 79
@jetstreamin
jetstreamin / batch.bat
Created February 18, 2017 19:05 — forked from bangonkali/batch.bat
Attaching Notepad++ to git commit editor.
git config core.editor "'C:\Program Files (x86)\Notepad++\notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
# longIslandIcedTea.py
# btc_usd on bitfinex
# Mike Mahon
# [email protected]
# 07/02/2017
# Interval Tests - 01-01-2016 to 06-02-2017 - Beg. Bal: $50
# 1 min interval - End Bal:
# 15 min interval - End Bal: $223.32
# 30 min interval - End Bal: $206.58
@jetstreamin
jetstreamin / ObjectDumper.cs
Created July 27, 2018 15:56
Object Dumper - C# way to dump all properties of an object
public static class ObjectDump
{
public static void Write(TextWriter writer, object obj)
{
if (obj == null)
{
writer.WriteLine("Object is null");
return;
}
@jetstreamin
jetstreamin / LastUpdateOfTable.sql
Created July 31, 2018 13:20
SQL Server - Last Update of a Table
declare @objectid int
select @objectid = object_id from sys.objects where name = 'documents'
select top 50
db_name(database_id) as [DbName]
, *
from sys.dm_db_index_usage_stats where object_id = @objectid
and last_user_update is not null
order by last_user_update
@jetstreamin
jetstreamin / RowModifiedTrigger.sql
Last active January 27, 2019 20:34
SQL - Row Update Trigger
-- Add the Modified field to the row
-- E.g. Add a column to the table using a create/alter statement like:
-- ...
-- Modified DATETIME2(3),
-- ...
-- Then create the trigger
CREATE TRIGGER updateModified
ON dbo.YourTable
AFTER UPDATE

ASP.NET Razor Syntax Reference

Code Block

@{
    int x = 123;
    string y = "because.";
}

Expression (Html Encoded)