Skip to content

Instantly share code, notes, and snippets.

markekraus / GetInboxRuleReport.ps1
Last active Jan 31, 2019
Generates Multi-Threaded Office 365 Inbox Rule Report That Scales with the Number of Service Accounts Provided
View GetInboxRuleReport.ps1
using namespace System.Collections.Concurrent
$StartDate = [datetime]::UtcNow
# can be generated with something like
# 1..10 | %{ Get-Credential} | Export-CliXml -path 'C:\reports\InboxRules\Creds.xml'
# Which will prompt for credentials 10 times and store them in the xml file
$CredentialFile = 'C:\reports\InboxRules\Creds.xml'
$RunDate = $StartDate.ToString('o') -replace ':'
# This is the path of the CSV file. It is imperative that this file not be
# access while the script is running
tonetheman /
Created Sep 27, 2020
find a radio button to click on
URI = ""
from selenium.webdriver import Chrome, ChromeOptions
from import expected_conditions as EC
from import WebDriverWait
from import By
ShayMe21 / MyViewController.cs
Created Jul 31, 2018
Xamarin with Auth0 and TouchID Authentication
View MyViewController.cs
using System;
using UIKit;
using Auth0.OidcClient;
using System.Text;
using LocalAuthentication;
using Foundation;
using Xamarin.Auth;
Xeoncross / ngrams.go
Last active Mar 29, 2021
Simple golang ngrams, bigrams, trigrams, and just plain word pair counter from any given slice of strings.
View ngrams.go
package main
import (
// SplitOnNonLetters splits a string on non-letter runes
TheCloudScout / dockerfile
Created Nov 4, 2019
View dockerfile
# escape=`
# Install .NET 4.8
RUN curl -fSLo dotnet-framework-installer.exe `
&& .\dotnet-framework-installer.exe /q `
&& del .\dotnet-framework-installer.exe `
&& powershell Remove-Item -Force -Recurse ${Env:TEMP}\*
bobbychopra / AddColumn.ps1
Created Oct 9, 2012
Add Date column to an existing csv file
View AddColumn.ps1
$today = [System.DateTime]::Today.ToString("yyyyMMdd")
Import-Csv -Header Column1,Column2 -Delim ',' 'C:\sample.csv' |
ForEach {
New-Object psobject -Property @{Date=$today;Col1=$_.Column1; Col2=$_.Column2}
} | Select-Object Date,Col1,Col2 | Export-Csv -NoTypeInformation 'C:\sample.csv'
rszeto / *
Last active Aug 12, 2021
Setting up PyCharm project with remote interpreter
View *

Setting up PyCharm project with remote interpreter

Setting up a remote interpreter on PyCharm is awfully unintuitive. I've pared it down to what I think is the minimal number of steps, and leaves the fewest number of deployment configurations and Python interpreters lying around. This is designed for my specific configuration (specifically PyTorch); adapt as needed.

Configuring default project (only do after installing PyCharm for the first time):

  1. (Optional) Add virtual environment path to excluded files
    1. From Welcome Page, go to Configure > Settings > Build, Execution, Deployment > Deployment > Options
    2. Add virtualenv path. For example, if you always have the project's virtualenv in .env, add ";.env" to the "Exclude items by name" field
HauptJ /
Last active Nov 29, 2021
Terraform Server Resource Creation and Provisioning with Ansible
# Creates and provisions DO cloud server for WordPress
resource "digitalocean_droplet" "wordpress" {
image = "centos-7-x64"
name = "${var.do_wordpress_name}"
region = "${var.do_region}"
size = "${var.do_wordpress_size}"
ipv6 = true
monitoring = true
ssh_keys = [
Blake- / gist:fc00725d519a25a55b3c2368d1ee238d
Created Oct 21, 2017
Mounting a s3ql file system to the S3 compatible file system at Softlayer on an Ubuntu 16 Xenial VSI
View gist:fc00725d519a25a55b3c2368d1ee238d
Mounting a s3ql file system to the S3 compatible file system at Softlayer on an Ubuntu 16 Xenial VSI
apt install s3ql
nano /etc/s3ql.authinfo
backend-login: somelogin