Skip to content

Instantly share code, notes, and snippets.

@OlafD
OlafD / SharePointCSOMQueryLargeLists.cs
Created July 31, 2019 06:09
Simple sample for looping a list with a caml query for a list with more than 5000 items.
List list = _ctx.Web.Lists.GetByTitle(Constants.Listnames.DocumentHistoryList);
_ctx.Load(list);
_ctx.ExecuteQueryRetry();
ListItemCollectionPosition collectionPosition = null;
CamlQuery query = new CamlQuery();
query.AllowIncrementalResults = true;
@spemer
spemer / customize-scrollbar.css
Last active May 16, 2025 20:21
✨ Customize website's scrollbar like Mac OS. Not supports in Firefox and IE.
/* Customize website's scrollbar like Mac OS
Not supports in Firefox and IE */
/* total width */
body::-webkit-scrollbar {
background-color: #fff;
width: 16px;
}
/* background of the scrollbar except button or resizer */
@jrosell
jrosell / TwitterPowerQuery.pbi
Created December 11, 2017 13:27
This Power Query script gets an bearer token and performs a tweet search from the Twitter REST API
/*
Author: https://chris.koester.io/index.php/2015/07/16/get-data-from-twitter-api-with-power-query/
Twitter REST API
https://dev.twitter.com/oauth/application-only
Requires establishing a Twitter application in order to obtain a Consumer Key & Consumer Secret
https://apps.twitter.com/
IMPORTANT - The Consumer Key and Consumer secret should be treated as passwords and not distributed
*/
let
Job description
Em um clima descontraído, fazendo uso de metodologias ágeis e compondo um time de profissionais altamente técnicos onde os
próprios gerentes também são desenvolvedores, atuará principalmente no backend de plataformas Web C# .NET, Xamarin (cross plataform),
MS SharePoint (nosso carro chefe) mas também utilizará muito javascript, css, html e cloud, estamos buscando alguém para
capacitar que tenha vontade de aprender não precisa saber programar, mas é um pré requisito que você tenha lógica de programação.
Atividades a Desempenhar:
Análise de requisitos
@andyhuey
andyhuey / deleteAllFromList.cs
Created December 21, 2016 20:39
CSOM code to delete all items from a SharePoint list
private void deleteAllFromList(ClientContext cc, List myList)
{
int queryLimit = 4000;
int batchLimit = 100;
bool moreItems = true;
string viewXml = string.Format(@"
<View>
<Query><Where></Where></Query>
<ViewFields>
@alfeugds
alfeugds / CurrencyConverter.cs
Last active July 13, 2023 06:01
Xamarin Forms Currency Mask for Entry fields
using System;
using System.Globalization;
using System.Text.RegularExpressions;
using Xamarin.Forms;
namespace MyProject.Util
{
/// <summary>
/// Converter for using in Entry fields for masked input of currency.
/// <para>The binded property must be of type decimal, and must invoke the PropertyChangedEventArgs event whenever the value is changed, so that the desired mask behavior is kept.</para>
@ericoporto
ericoporto / ywcc_ptbr.py
Created July 28, 2015 00:39
Yahoo Weather API Condition Codes in Brazilian Portuguese (Códigos do Yahoo Weather em Português - Brasil)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Erico Vieira Porto
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@flangofas
flangofas / ConvertMS.js
Last active March 28, 2025 14:13
JS: Convert Milliseconds to days? minutes? seconds? or all!
function convertMiliseconds(miliseconds, format) {
var days, hours, minutes, seconds, total_hours, total_minutes, total_seconds;
total_seconds = parseInt(Math.floor(miliseconds / 1000));
total_minutes = parseInt(Math.floor(total_seconds / 60));
total_hours = parseInt(Math.floor(total_minutes / 60));
days = parseInt(Math.floor(total_hours / 24));
seconds = parseInt(total_seconds % 60);
minutes = parseInt(total_minutes % 60);
@patt0
patt0 / cbl.js
Last active April 4, 2025 13:16
ContinuousBatchLibrary is a Google Apps Script library that manages large batches and works around the 5 minute limitation of GAS execution. It does this by setting time based triggers in the future as well as memorising the last processed key in the batch in order to restart from the correct position. At the end of the batch a cleanup function …
/**
* --- Continous Execution Library ---
*
* Copyright (c) 2013 Patrick Martinent
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@MartinBodocky
MartinBodocky / gist:7984439
Last active March 10, 2020 17:50
Get Calendar recurrent events by CSOM from SharePoint 2013.
GetItemsFromCalendarAsmx = function (webUrl, calendarGuid) {
wsURL = webUrl + "_vti_bin/Lists.asmx";
var xmlCall =
"<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> <soap:Body>" +
"<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>" +
"<listName>" + calendarGuid + "</listName>" +
"<query>" +
"<Query>" +