Skip to content

Instantly share code, notes, and snippets.

jamesinc / aws-notification-timer.user.js
Last active Jun 5, 2022
AWS console notification dismisserator 9000 - dismiss AWS flash notifications after (about) 5 seconds
View aws-notification-timer.user.js
// ==UserScript==
// @name AWS console notification dismisserator 9000
// @namespace
// @version 1.0
// @description Dismiss AWS flash notifications after about 5 seconds
// @author James Ducker
// @match https://**
// @grant none
// @run-at document-end
// ==/UserScript==
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 = [
sail1972 / main.go
Last active Aug 31, 2022
golang convert UTF16 to UTF8 or UTF8 to UTF16
View main.go
// from blog of
package main
import (
func main() {
181192 /
Last active Aug 24, 2022
How to increase the root partition size on Fedora

How to increase the root partition size on Fedora

Boot up with an Fedora Live USB stick.

  1. Run vgs to check if there's any space:
$ sudo vgs
  VG     #PV #LV #SN Attr   VSize    VFree
  fedora   1   3   0 wz--n- <237.28g    0 
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;
bgadrian / set.go
Last active Sep 16, 2022
How to implement a simple set data structure in golang
View set.go
type Set struct {
list map[int]struct{} //empty structs occupy 0 memory
func (s *Set) Has(v int) bool {
_, ok := s.list[v]
return ok
nqbao /
Last active Jul 8, 2022
Python class to provide a dictionary-like interface to access AWS SSM Parameter Store easily
# Copyright (c) 2018 Bao Nguyen <>
# 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:
# The above copyright notice and this permission notice shall be included in all
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
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
rivo / postgres.go
Last active Sep 7, 2022
A demo Go application (a PostgreSQL database browser) highlighting the use of the rivo/tview package. See
View postgres.go
package main
import (