Skip to content

Instantly share code, notes, and snippets.

View gunnarmagholder's full-sized avatar

Gunnar Magholder gunnarmagholder

View GitHub Profile
@gunnarmagholder
gunnarmagholder / index.html
Created March 8, 2022 07:10
Vue.js - Multi-select custom searchable dropdown with custom checkboxes
<div id="app" class="checkbox-select">
<div class="checkbox-select__trigger" :class="{ isActive: activeTrigger }" @click="showDropdown">
<span class="checkbox-select__title">Select property type</span>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129"><path d="M121.3 34.6c-1.6-1.6-4.2-1.6-5.8 0l-51 51.1-51.1-51.1c-1.6-1.6-4.2-1.6-5.8 0-1.6 1.6-1.6 4.2 0 5.8l53.9 53.9c.8.8 1.8 1.2 2.9 1.2 1 0 2.1-.4 2.9-1.2l53.9-53.9c1.7-1.6 1.7-4.2.1-5.8z"/></svg>
</div>
<div id="dropdown" class="checkbox-select__dropdown" :class="{ activeSearch: showLoader }">
<div class="checkbox-select__search-wrapp">
<input type="text" @focus="showLoader = true" @blur="showLoader = false" placeholder="search filters..." v-model="search">
</div>
public IEnumerable<UserAccount> GetPage(string sortField, int start, int Number)
{
UserPrincipalEx findAllUsers = new UserPrincipalEx(thisOU);
PrincipalSearcher ps = new PrincipalSearcher(findAllUsers);
((DirectorySearcher) ps.GetUnderlyingSearcher()).PageSize = 0;
((DirectorySearcher)ps.GetUnderlyingSearcher()).Sort = new SortOption("cn", SortDirection.Ascending);
((DirectorySearcher)ps.GetUnderlyingSearcher()).VirtualListView = new DirectoryVirtualListView(0, Number, start);
PrincipalSearchResult<Principal> result = ps.FindAll();
foreach (UserPrincipalEx user in result)
{
@gunnarmagholder
gunnarmagholder / 0_reuse_code.js
Created July 18, 2014 05:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gunnarmagholder
gunnarmagholder / gist:2761013
Created May 21, 2012 07:47
Some fileposting stoff
$(document).ready(function(){
jQuery.post(
"output.pdf",
jQuery(this).serialize()
)
});