Skip to content

Instantly share code, notes, and snippets.

Sean Hunter freshcutdevelopment

Block or report user

Report or block freshcutdevelopment

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
freshcutdevelopment / SubstringSQL
Created Nov 10, 2014
Returns the substring of a given DB field starting from the last index of the given CHAR input
View SubstringSQL
freshcutdevelopment / SplitByLineCount
Created Nov 11, 2014
PowerShell one liner to split by line count
View SplitByLineCount
$i=0; Get-Content .\filePaths.txt -ReadCount 500 | %{$i++; $_ | Out-File out_$i.txt}
freshcutdevelopment / Zip and Upload
Last active Aug 29, 2015
Creates a ZIP file with a unique name and uploads to a given FTP site
View Zip and Upload
function ZipAndUpload([string]$ftpUrl, [string]$ftpUsername, [string]$ftpPassword, [string]$inputPath, [string]$filterExpression) {
$webclient = New-Object System.Net.WebClient
$webclient.Credentials = New-Object System.Net.NetworkCredential($ftpUsername,$ftpPassword)
$inputPath = Resolve-Path $inputPath
$file = [System.Io.File]::GetAttributes($inputPath)
$uniqueFormatPart = Get-Date -format yyyyMMddHHmmssfff
freshcutdevelopment / GetFilePathRoot
Created May 9, 2015
Get file path root (excluding file name) with Vbscript
View GetFilePathRoot
Function GetFilePath(FullPath)
Dim filePath, pathArray
pathArray = Split(FullPath, "\")
pathArray(UBound(pathArray)) = ""
filePath = Join(pathArray, "\")
View TipCalculator_v1.fs
open System
//take sale amount and tip %
//compute the tip amount
//print out both the tip and the total amount of the bill
let tipAmount saleAmount tipPercentage = tipPercentage/100.00 * saleAmount
let totalAmount saleAmount tipPercentage = (tipAmount saleAmount tipPercentage) + saleAmount
View quoteprinter.fs
open System
type quote = {message :string; actor: string;}
let main argv =
let quotes = [{message="shaken not stirred"; actor="sean connery"};
{message="i'll be back";actor="terminator"}]
View storyprinter.fs
open System
type story = {verb:string;noun:string;adjective:string;adverb:string}
let getResponse choice =
match choice with
| "yes" -> "That's hilarious. \n"
| "no" -> "That sucks. \n"
| _ -> "I don't even know how to respond to that. \n"
freshcutdevelopment / app.html
Last active Oct 22, 2015
Aurelia - Getting Started
View app.html
<!-- app/app.html -->
View aurelia-gulpfile.js
var gulp = require('gulp');
var browserSync = require('browser-sync');
var nodemon = require('gulp-nodemon');
gulp.task('browser-sync', ['nodemon'], function() {
browserSync.init(null, {
proxy: "http://localhost:5001",
files: ["app/**/*.*"],
browser: "google chrome",
port: 7001,
View aurelia-express.js
'use strict';
var express = require('express');
var app = express();
app.get('/', function(req, res) {
You can’t perform that action at this time.