Skip to content

Instantly share code, notes, and snippets.

View hasokeric's full-sized avatar
👋

Haso Keric hasokeric

👋
View GitHub Profile
@hasokeric
hasokeric / email-deadlines.php
Created January 14, 2016 19:12 — forked from cfenollosa/email-deadlines.php
Postpone your own email
#!/usr/bin/env php
<?php
// Script to postpone your own email. Parses IMAP folders and moves emails to a folder named "Today"
// Run this from a crontab, for example at 6 AM
// BSD License
// (C) Carlos Fenollosa, 2011-2016
// Read more about this script: http://cfenollosa.com/blog/a-simple-script-to-postpone-your-own-email.html
// Please leave comments and feedback for bugs and ideas!
@hasokeric
hasokeric / BarTender Dealing with CBool use ABS()
Created January 25, 2016 12:38
BarTender Dealing with CBool use ABS()
'Called for every label that is printed.
'================================================
' Used to Set All Label Changes at once for speed
'================================================
Dim btNamedSubString
btNamedSubString = ""
'================================================
@hasokeric
hasokeric / Epicor Research Notes
Created March 23, 2015 19:03
Some Epicor Research Notes
use the Framework:
Epicor.Mfg.UI.FrameWork.FormFunctions.IsRunningInIDE()
IsNum
IsDate
GetImageFromLocalList
GetSessionFromSender
GetAvailableAdapters
buildKeyList
SendShortcutListToEmail
@hasokeric
hasokeric / CSharp_ConverSecondsSinceMidnight.cs
Last active March 18, 2016 13:13
Epicor: Convert Seconds Since Midnight to an Actual Time
public static string ConvertSecondsToTime(int secondsSinceMidnight)
{
// Initialize Variables
int hour = 0, minutes = 0, seconds = 0;
decimal hourSecondsLeftOver = 0;
// Get Hour
hour = (int) secondsSinceMidnight / 3600;
hourSecondsLeftOver = (decimal) secondsSinceMidnight - (hour * 3600);
@hasokeric
hasokeric / company-ownership.md
Created July 5, 2016 18:22 — forked from jdmaturen/company-ownership.md
Who pays when startup employees keep their equity?

Who pays when startup employees keep their equity?

JD Maturen, 2016/07/05, San Francisco, CA

As has been much discussed, stock options as used today are not a practical or reliable way of compensating employees of fast growing startups. With an often high strike price, a large tax burden on execution due to AMT, and a 90 day execution window after leaving the company many share options are left unexecuted.

There have been a variety of proposed modifications to how equity is distributed to address these issues for individual employees. However, there hasn't been much discussion of how these modifications will change overall ownership dynamics of startups. In this post we'll dive into the situation as it stands today where there is very near 100% equity loss when employees leave companies pre-exit and then we'll look at what would happen if there were instead a 0% loss rate.

What we'll see is that employees gain nearly 3-fold, while both founders and investors – particularly early investors – get dilute

@hasokeric
hasokeric / 0_reuse_code.js
Created August 12, 2016 19:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@hasokeric
hasokeric / Quote.GetNewQuoteHed.POST.p
Created August 31, 2016 15:24
Epicor's System sets an Automatic Due Date from your Company Config table... But if you say +3 days... it doesnt care if its a weekend or a holiday... Lets check the Production Calendar and assign a proper DueDate.
/* Specify the DueDate */
def var newDate as Date init Today no-undo.
def var totalDays as Integer init 0 no-undo.
def var validDateFound AS LOGICAL init false no-undo.
def var calName as Character init "MAIN" no-undo.
for each ttQuoteHed where ttQuoteHed.RowMod = "A".
if (ttQuoteHed.Quoted eq false) THEN DO:
/* Initialize */
@hasokeric
hasokeric / bpm.cs
Created August 31, 2016 15:27
Get Current Instance of Running BO within a BPM
this.defaultImpl
//This will give you access to the current instance of the BO within BPM.
//For example on Order Update BPM you need to run a GetByID You woudl do as follows
SalesOrderTableset sots = this.defaultImpl.GetByID(5555);
//No need to instanciate another Sales Order BO
@hasokeric
hasokeric / cs.cs
Created August 31, 2016 15:29
Set Invoice Selected in AR Cash Receipt Entry
public void selectInv(int invc)
{
EpiDataView edv = oTrans.Factory("InvcHead");
for(int i =0; i < edv.dataView.Count; i++)
{
if((int)edv.dataView[i]["InvoiceNum"] == invc)
{
//edv.Row =i;
edv.RaiseRowChanged(i,edv.Row);
@hasokeric
hasokeric / sql.sql
Created August 31, 2016 15:34
E10 wants you to have 1 TempDB File Per Each CPU on SQL
ALTER DATABASE tempdb
ADD FILE (NAME = tempdev2, FILENAME = 'W:\tempdb2.mdf', SIZE = 256);
ALTER DATABASE tempdb
ADD FILE (NAME = tempdev3, FILENAME = 'X:\tempdb3.mdf', SIZE = 256);
ALTER DATABASE tempdb
ADD FILE (NAME = tempdev4, FILENAME = 'Y:\tempdb4.mdf', SIZE = 256);
GO