Skip to content

Instantly share code, notes, and snippets.

// less variables for brand-colors from the website: brandcolors.com
$aetna: #d20962;
$aetna-1: #00bce4;
$aetna-2: #7ac143;
$aetna-3: #00a78e;
$aetna-4: #f47721;
$aetna-5: #d20962;
$aetna-6: #7d3f98;
@examinedliving
examinedliving / GetPropertyValues.vb
Created September 29, 2019 13:03
Uses reflection to Get Class Instance Properties give "obj" is instance of class, returns a JSON key-value string of all properties of class.
Public Function GetPropertyValues(obj As Object) As String
Dim json As JObject = JObject.Parse("{}")
Dim t As Type = obj.GetType()
Dim props() As Reflection.PropertyInfo = t.GetProperties()
For Each prop In props
If prop.GetIndexParameters().Length = 0 Then
json.Item(prop.Name) = JToken.FromObject(prop.GetValue(obj, Nothing))
End If
@examinedliving
examinedliving / b64toBlob.js
Created September 24, 2019 15:28
Base64 to Blob (es6)
const b64toBlob = async (b64Data, contentType = 'application/octet-stream') => {
const url = `data:${contentType};base64,${b64Data}`;
const response = await fetch(url);
const blob = await response.blob();
return blob;
};
// https://stackoverflow.com/a/36183085/1167442
@examinedliving
examinedliving / encrypt.cmd
Created June 6, 2019 13:07
Encrypting connection strings in web config
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe" -pef "connectionStrings" "C:\inetpub\wwwroot\ProjectName"
@examinedliving
examinedliving / footer.js
Created May 8, 2019 14:33 — forked from chrisdiana/footer.js
Dynamically add footer to jQuery Datatable
@examinedliving
examinedliving / example.sass
Created April 5, 2019 20:29 — forked from brod-ie/example.sass
respond-to() SASS mixin for Bootstrap 3 grid system.
.profile-pic {
float: left;
width: 250px;
@include respond-to(xs) {
width: 100%;
}
@include respond-to(sm) {
width: 125px;
}
[
"#af5749",
"#cae4e3",
"#fce493",
"#e8f8e3",
"#af99b0",
"#fcf8e3"
]
@examinedliving
examinedliving / git-delete-branch.md
Created February 21, 2018 18:41
Deleting Git Branches
# local
git branch -d {{branch-name}}

# remote

git push origin :{{branch-name}}

@examinedliving
examinedliving / git-merge.md
Created February 21, 2018 18:37
Merging git branch into another
# from fully committed {{new-branch}}
git checkout {{main-branch}}
git pull origin {{main-branch}}
git merge {{new-branch}}

git push origin {{main-branch}}

@examinedliving
examinedliving / flat-ui-gb.less
Created February 14, 2018 17:45
Flat UI Palette from Flatuicolors.com - GB Version
@BlueNights:rgb(53, 59, 72);
@BlueberrySoda:rgb(127, 143, 166);
@ChainGangGrey:rgb(113, 128, 147);
@DownloadProgress:rgb(76, 209, 55);
@Electromagnetic:rgb(47, 54, 64);
@HarleyDavidsonOrange:rgb(194, 54, 22);
@HintofPensive:rgb(220, 221, 225);
@LynxWhite:rgb(245, 246, 250);
@MattPurple:rgb(140, 122, 230);
@MazarineBlue:rgb(39, 60, 117);