Skip to content

Instantly share code, notes, and snippets.

View CodeHeight's full-sized avatar
🏠
Into the void...

CodeHeight CodeHeight

🏠
Into the void...
View GitHub Profile
@CodeHeight
CodeHeight / dropdown.vbhtml
Last active February 8, 2023 16:00
VB.NET @Html.DropDownListFor
@Html.DropDownListFor(Function(Model) Model.ProgramTypeId, New SelectList(Model.allPrograms,
"ProgramTypeId", "ProgramName"), "Select Program....",
New With {Key .class = "form-control", Key .required = "Required"})
@CodeHeight
CodeHeight / IEversion.js
Last active March 6, 2017 14:13
Javascript that will detect what IE version.
function GetIEVersion() {
var sAgent = window.navigator.userAgent;
var Idx = sAgent.indexOf("MSIE");
// If IE, return version number.
if (Idx > 0)
return parseInt(sAgent.substring(Idx + 5, sAgent.indexOf(".", Idx)));
// If IE 11 then look for Updated user agent string.
else if (!!navigator.userAgent.match(/Trident\/7\./))
return 11;
else
@CodeHeight
CodeHeight / GenerateLeftMenu.vbhtml
Last active October 23, 2019 19:14
PartialView within parent Layout.vbhtml that builds an accordion menu with 1 deep child items
@Imports Project.Domain.Constants
@Imports Project.Domain.Models
@Imports Project.Utilities
@Imports Project.Web.ViewModels
@ModelType LeftMenuViewModel
@Code
Layout = Nothing
Dim currentRouteData = HttpContext.Current.Request.RequestContext.RouteData
Dim currentController = currentRouteData.GetRequiredString("controller")
Dim currentAction = currentRouteData.GetRequiredString("action")
Imports System
Imports System.Collections.Generic
Imports Project.Domain.Constants
Namespace Interfaces
Public Interface ICacheService
Function [Get](Of T)(key As String) As T
Function [GetList](Of T)(key As String) As List(Of T)
Sub [Set](key As String, data As Object, minutesToCache As CacheTimes)
Function IsSet(key As String) As Boolean
private getListsInfo() {
let html: string = '';
if (Environment.type === EnvironmentType.Local) {
this.domElement.querySelector('#lists').innerHTML = "This does not work in local workbench.";
} else {
this.context.spHttpClient.get(
this.context.pageContext.web.absoluteUrl + `/_api/web/lists?$filter=Hidden eq false`, SPHttpClient.configurations.v1)
.then((response: SPHttpClientResponse) => {
response.json().then((listObjects: any) => {
listObjects.value.forEach(listObject => {
@CodeHeight
CodeHeight / genesis.json
Last active November 11, 2017 20:17
genesis.json
{
"nonce": "0x0000000000000042",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"difficulty": "0x400",
"alloc": {},
"coinbase": "0x0000000000000000000000000000000000000000",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x",
"gasLimit": "0xffffffff",
@CodeHeight
CodeHeight / startnode.sh
Created November 11, 2017 20:16
startnode.sh
geth --networkid 4224 --mine --datadir "~/CodeHeight/private" --nodiscover --rpc --rpcport "8545" --port "30303" --rpccorsdomain "*" --nat "any" --rpcapi eth,web3,personal,net --unlock 0 --password password.sec
@CodeHeight
CodeHeight / Index.html
Created November 28, 2017 23:02
Generate IOTA seed
<html>
<style type="text/css">
body { background-color: #000;}
body,td,th {color: #0F0;}
</style>
<script>
function ran(){
var chars = "9ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var string_length = 81;
var randomstring = '';
@CodeHeight
CodeHeight / Vaccine.vb
Last active March 13, 2018 15:55
3 Tier VB.net Oracle ADO.net connection
Public Class PatientVaccineHistory
Public Property VaccineId As String
Public Property VaccineAbbreviation As String
Public Property VaccinationDate As String
Public Property FamilyId As String
Public Property SiteId As String
Public Property ReportedSiteId As String
Public Property HistoricalEncountered As String
End Class
@CodeHeight
CodeHeight / Skeleton.vb
Created April 20, 2018 20:40
Multiple List objects in One object
Namespace Models
Public Class SkeletonOne
Public Property Id As String
Public Property Abbreviation As String
Public Property Date As String
End Class
Public Class SkeletonTwo
Public Property Id As String
Public Property Abbreviation As String