Viewpoint is built with two major components in its overall architecture. There is the back-end, which talks via SOAP messages to the Exchange Web Services (EWS) endpoint and the front-end which provides an easier-to-use interface and is intended as the main point of user interaction. The front-end was not intended to fulfill all of the capabilities that EWS provides but give users and path with little resistance to get most tasks done. Should someone need to reach into the depths of the more obscure the back-end could be tapped to help out with those instances.
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
require "objspace" | |
class TestWithFinalizer | |
def self.finalizer | |
proc {|o_id| puts "Collected #{o_id}"} | |
end | |
def test | |
3.times.each_with_object(mark []) {|i,a| |
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
# Dan Wanek <[email protected]> | |
# 2013-09-04T15:41:31+00:0 | |
# | |
# This extension can be used to create instance-level validations. For example | |
# if you have an instance of 'user' you can do something like the following: | |
# @example: | |
# user.custom_validation ->(scope) { | |
# if scope.bad_logins >= account.max_bad_logins | |
# scope.errors.add :bad_logins, "too many bad logins for your account policy" | |
# 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
require 'time' | |
class GapMean | |
THE_ANSWER_TO_LIFE_AND_EVERYTHING = 42 | |
K = Math.log(THE_ANSWER_TO_LIFE_AND_EVERYTHING) | |
attr_reader :gaps, :running_total, :exp, :window | |
def initialize(seq) | |
@seq = seq |
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
# Go | |
rate: 3391320.62 | |
rate: 3393174.22 | |
rate: 3381328.82 | |
# C | |
Rate: 4409458.639422 (count: 50000000) | |
Rate: 3165676.958497 (count: 50000000) | |
Rate: 4281366.171821 (count: 50000000) |
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
gcc -fPIC -rdynamic -g -c -Wall getpwuid_preload64.c | |
gcc -fPIC -rdynamic -g -c -Wall getlogin_preload64.c | |
gcc -shared -WI,-soname,libcpreload64.so.1 -o libcpreload64.so.1.0.1 getpwuid_preload64.o getlogin_preload64.o -lc -ldl |
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
:nnoremap <silent> <leader>h1 :hi W1 guibg=#aeee00 guifg=#000000 ctermbg=154 ctermfg=16<cr> :execute 'match W1 /\<<c-r><c-w>\>/'<cr> |
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
class File | |
def last_line | |
ind = 1 | |
loop do | |
offset = (ind * -80) | |
if(offset >= size) | |
seek(0, IO::SEEK_SET) | |
line = read | |
line.chomp! | |
return line.split(/\n/, -1).last |
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
require 'nokogiri' | |
def mkxml(b, nm, bhash) | |
b.send(nm.to_s) { | |
bhash.each_pair do |k, v| | |
if(v.is_a?(Hash)) | |
mkxml(b, k, v) | |
elsif(v.is_a?(Array)) | |
b.send(k, v.shift, v[0].keys.first => v[0].values.first) | |
else |
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
# A script to fetch AD Users and put them into a spreadsheet | |
# Dan Wanek <[email protected]> | |
# 08/24/2011 22:36:00 | |
param( | |
[int]$limit = 20, | |
[string]$ou = "", | |
[string]$outFile = $(Get-Location).Path + "\LDAP_USER_RPT.xls", | |
[switch]$verbose, | |
[switch]$usage |