Skip to content

Instantly share code, notes, and snippets.

View Natfan's full-sized avatar
😄
Poorly writing the next big hit!

Nathan Natfan

😄
Poorly writing the next big hit!
View GitHub Profile
//debouncer.js
/*
This is the typical debouncer function that receives
the "callback" and the time it will wait to emit the event
*/
function debouncer (fn, delay) {
var timeoutID = null
return (() => {
clearTimeout(timeoutID)
timeoutID = setTimeout(() => fn.apply(this, arguments), delay)
@Natfan
Natfan / PromptMethod-dotNET.ps1
Last active June 22, 2022 20:33 — forked from JeffBrownTech/PromptMethod-dotNET.ps1
Create a PowerShell prompt using .NET classes
function Remove-MyItem {
[CmdletBinding()]
param(
[Parameter(Mandatory, Position = 1)]
[string]
$Path
)
$item = Get-Item -Path $Path
@Natfan
Natfan / index.html
Created April 19, 2020 22:56
UIKit 3 Sortable Test
<div class="uk-section uk-section-primary uk-padding-remove-vertical">
<div class="uk-container">
<div uk-grid>
<div class="uk-width-1-6">
<nav uk-navbar>
<div class="uk-navbar-center">
<a class="uk-navbar-item uk-logo" href="">
<img class="uk-margin-small-right" height="48" width="48" src="https://image.flaticon.com/icons/svg/426/426121.svg">
Dashboard
</a>
@Natfan
Natfan / ms-teams-get-oauth.ps1
Last active August 19, 2019 14:39
Microsoft Teams Client API Example - Getting OAuth Bearer Token (https://blog.natfan.io/teams/1)
function Get-OAuthToken {
[CmdletBinding()]
[OutputType([string])]
param (
[Parameter(Mandatory)]
[Parameter(Mandatory)][ValidateScript({[GUID]::TryParse($_, [ref][GUID]::Empty)})][String]$TenantID,
[Parameter(Mandatory)][PSCredential][System.Management.Automation.CredentialAttribute()]$Credential
)
try {
@Natfan
Natfan / .cvimrc
Last active August 8, 2017 15:00
My cVimRC File
let barposition = "bottom"
" alias ':g' to ':tabnew google'
command g tabnew google
let searchalias g = "google"
" rebinds ; to : to stop that damn shift key
map ; :

Keybase proof

I hereby claim:

  • I am natfan on github.
  • I am natfan (https://keybase.io/natfan) on keybase.
  • I have a public key ASDblDUhdxZ2xJzW1XDfCT3rvHdKEyzx6MQ8bn2D_GK66Qo

To claim this, I am signing this object:

public void SendInGameMesssage(String message) {
Bukkit.broadcast(message, "errors.notify");
new BukkitPoster(message, "BugReporter").runTaskAsynchronously(this);
}