Skip to content

Instantly share code, notes, and snippets.

#include <map>
#include <vector>
#include "string.h"
#include <stdio.h>
#include <iostream>
using namespace std;
double findLowerKey(const std::map<double, vector<double>>& p_map, double p_key)
{
# This is an example profile for PSReadLine from:
# https://github.com/PowerShell/PSReadLine/blob/dc38b451bee4bdf07f7200026be02516807faa09/PSReadLine/SamplePSReadLineProfile.ps1
#
# This is roughly what I use so there is some emphasis on emacs bindings,
# but most of these bindings make sense in Windows mode as well.
# Searching for commands with up/down arrow is really handy. The
# option "moves to end" is useful if you want the cursor at the end
# of the line while cycling through history like it does w/o searching,
# without that option, the cursor will remain at the position it was
@codewzrd
codewzrd / setup_new_machine.bat
Last active April 5, 2023 18:55
New Machine Setup via Winget
winget install --id=7zip.7zip -e
winget install --id=Amazon.AWSCLI -e
winget install --id=Amazon.SAM-CLI -e
winget install --id=BeyondCompare3_is1 -e
winget install --id=Microsoft.BingWallpaper -e
winget install --id=Docker.DockerDesktop -e
winget install --id=DominikReichl.KeePass -e
winget install --id=File-New-Project.EarTrumpet -e
winget install --id=gerardog.gsudo -e
winget install --id=Git.Git -e --accept-package-agreements --accept-source-agreements
@codewzrd
codewzrd / timezone.sql
Last active September 12, 2019 16:35
SQL Server CASE Statement to Convert Java Timezone to Windows Timezone
CASE
WHEN s.EventTimeZone = 'America/New_York' THEN s.EventDateTime
WHEN s.EventTimeZone = 'Asia/Tokyo' THEN CAST(CONCAT(s.EventDateTime AS DATETIME2) AT TIME ZONE 'Tokyo Standard Time' AT TIME ZONE 'Eastern Standard Time'
WHEN s.EventTimeZone = 'Atlantic/Reykjavik' THEN CAST(s.EventDateTime AS DATETIME2) AT TIME ZONE 'Greenwich Standard Time' AT TIME ZONE 'Eastern Standard Time'
WHEN s.EventTimeZone = 'Australia/Sydney' THEN CAST(s.EventDateTime AS DATETIME2) AT TIME ZONE 'AUS Eastern Standard Time' AT TIME ZONE 'Eastern Standard Time'
WHEN s.EventTimeZone = 'Europe/Amsterdam' THEN CAST(s.EventDateTime AS DATETIME2) AT TIME ZONE 'W. Europe Standard Time' AT TIME ZONE 'Eastern Standard Time'
WHEN s.EventTimeZone = 'Europe/Copenhagen' THEN CAST(s.EventDateTime AS DATETIME2) AT TIME ZONE 'W. Europe Standard Time' AT TIME ZONE 'Eastern Standard Time'
WHEN s.EventTimeZone = 'Europe/Helsinki' THEN CAST(s.EventDateTime AS DATETIME2) AT TIME ZONE 'FLE Stand
@codewzrd
codewzrd / spambox.js
Created December 30, 2008 14:30
Temporary email address from Spambox.us
var noun_type_lifetime = new CmdUtils.NounType("Lifespan",
["half hour", "hour", "half day", "day", "week", "month", "half year", "year"]);
CmdUtils.CreateCommand(
{
name: "spambox",
description: "Creates a temporary email address from spambox.us.",
icon: "http://www.spambox.us/favicon.ico",
homepage: "http://www.makadia.com",
author: { name: "Svapan Makadia", email: "codewzrd@hotmail.com"},
@codewzrd
codewzrd / evernote.js
Created October 17, 2008 12:29
Evernote bookmarklet
CmdUtils.makeBookmarkletCommand({
name: "Evernote",
description: "Save a note on Evernote.",
icon: "http://www.evernote.com/favicon.ico",
homepage: "http://www.makadia.com",
author: {name: "Svapan Makadia", email: "codewzrd@hotmail.com"},
help: "Select content and invoke this command to save the selection as a note or just save the whole page without selecting anything.",
url: "javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var%20x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new%20Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();"
})
@codewzrd
codewzrd / jetable.js
Created September 17, 2008 17:30
Temporary email address from Jetable
var noun_type_lifespan = new CmdUtils.NounType("Lifespan",
["hour", "day", "week", "month"]);
CmdUtils.CreateCommand(
{
name: "jetable",
description: "Creates a temporary email address from Jetable.org.",
icon: "http://www.jetable.org/favicon.ico",
homepage: "http://www.makadia.com",
author: { name: "Svapan Makadia", email: "codewzrd@hotmail.com"},
@codewzrd
codewzrd / delicious.js
Created September 8, 2008 18:09
delicious
CmdUtils.CreateCommand({
name: "delicious",
description: "It is equivalent to the Delicious.com bookmarklet.",
icon: "http://delicious.com/favicon.ico",
homepage: "http://www.makadia.com",
author: { name: "Svapan Makadia", email: "codewzrd@hotmail.com"},
help: "If you select some text, it will be placed in the notes field.",
preview: "Bookmark the current page to Delicious.com",