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
## | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2014 Ryan Morrissey | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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
# create a new set and add values | |
myset = set() | |
myset.add(1) | |
myset.add(2) | |
myset.add(4) | |
# by default, a set returns a set Object | |
# myset = set([1, 2, 4]) | |
# use join() to parse the List into a str |
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
--https://github.com/statonjr/techshow-2013 | |
tell application "Reminders" | |
set todo_accounts to every account | |
-- accounts have lists. loop thru accounts to get their lists. | |
repeat with i from 1 to length of todo_accounts | |
tell account i | |
set todo_lists to get every list | |
-- lists have reminders. loop thru lists to get their reminders | |
repeat with j from 1 to length of todo_lists |
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(){ | |
// the minimum version of jQuery we want | |
var v = "1.8.3"; | |
// check prior inclusion and version | |
if (window.jQuery === undefined || window.jQuery.fn.jquery < v) { | |
var done = false; | |
var script = document.createElement("script"); | |
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/" + v + "/jquery.min.js"; |
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
// ==UserScript== | |
// @name Whitlock Sublist Hover | |
// @version 0.1 | |
// @description Float item sublist header on scroll | |
// @match https://system.netsuite.com/* | |
// @grant none | |
// @require http://code.jquery.com/jquery-latest.js | |
// ==/UserScript== | |
(function() { |
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
-- Convert calendar date to Oracle fiscal month (MM-MON) | |
CASE WHEN MOD(TO_NUMBER(TO_CHAR({date_field}, 'MM')), 12) >= 6 THEN TO_CHAR(MOD(TO_NUMBER(TO_CHAR({date_field}, 'MM')), 12) - 5, '09') ELSE TO_CHAR(MOD(TO_NUMBER(TO_CHAR({date_field}, 'MM')), 12) + 7, '09') END || '-' || TO_CHAR({date_field}, 'MON') | |
-- Convert calendar date to Oracle fiscal quarter (Q#) | |
CASE WHEN TO_CHAR({date_field}, 'MM') IN ('06', '07', '08') THEN 'Q1' WHEN TO_CHAR({date_field}, 'MM') IN ('09', '10', '11') THEN 'Q2' WHEN TO_CHAR({date_field}, 'MM') IN ('12', '01', '02') THEN 'Q3' WHEN TO_CHAR({date_field}, 'MM') IN ('03', '04', '05') THEN 'Q4' END | |
-- Convert calendar date to Oracle fiscal year (YYYY) | |
CASE WHEN TO_NUMBER(TO_CHAR({date_field}, 'MM')) < 6 THEN TO_CHAR(TO_NUMBER(TO_CHAR({date_field}, 'YYYY')) - 1, '9999') ELSE TO_CHAR(TO_NUMBER(TO_CHAR({date_field}, 'YYYY')), '9999') END |
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
<table align="left" border="0" width="100%"> | |
<tr> | |
<td> | |
<piegraph width="150" height="150" display-key="flat-outer"> | |
<#assign previous_itemtype = ""> | |
<#assign item_name = ""> | |
<#list record.item?sort_by('itemtype') as item> | |
<#if item.itemtype != previous_itemtype> | |
<#assign current_itemtype = item.itemtype> |
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
/** | |
*@NApiVersion 2.x | |
*@NScriptType UserEventScript | |
*/ | |
// Load two standard modules. | |
define ( ['N/record', 'N/search', 'N/ui/serverWidget'] , | |
// Add the callback function. | |
function(record, search, serverWidget) { |
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 getData() { | |
var recordType = "customrecord_sc_request"; | |
var searchId = "customsearch_scm_eng_by_sc_12_mos"; | |
var results = nlapiSearchRecord(recordType, searchId); | |
if (!results || results.length === 0) { return None; } | |
var data_all = []; | |
function DataEntry(x, y) { |
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 getData() { | |
var recordType = "customrecord_sc_request"; | |
var searchId = "customsearch_rcm_dealtracker_timeline"; | |
var results = nlapiSearchRecord(recordType, searchId); | |
var _data = null; | |
var categories = []; | |
if (!results || results.length === 0) { return None; } |