Skip to content

Instantly share code, notes, and snippets.

View Erutan409's full-sized avatar

Michael Keyser Erutan409

  • Grand Rapids, MI
View GitHub Profile
@dwjohnston
dwjohnston / hexToCssFilters.ts
Last active March 18, 2024 16:07
TS Hex to CSS filters solution
//As referenced in this solution
import { number } from "prop-types";
//https://codepen.io/sosuke/pen/Pjoqqp
interface HSL {
h: number;
@Splode
Splode / Laravel-Scheduler-Windows.md
Last active September 19, 2024 17:37
Laravel Scheduler on Windows

Run Laravel Scheduled Tasks on Windows

The following are instructions for running scheduled tasks defined in a Laravel project on Windows. The Laravel documentation provides instructions for running scheduled tasks using cron jobs on Linux systems. However, cron jobs are not available on Windows. The built-in Windows Task Scheduler can be used to run scheduled tasks instead.

Create a Scheduled Task

  1. Open Task Scheduler
  2. Select Create Task...
  3. Give the task a name and description
  4. To run the task in the background, select Run whether the user is logged on or not and check the Hidden checkbox.
@twilly86
twilly86 / Upsert.cs
Last active October 11, 2022 12:36
AddOrUpdate entityframework upsert call on specific properties
using System;
using System.Collections.Generic;
using System.Data.Entity.Migrations;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
/// <summary>
@rdundon
rdundon / git-setup.sh
Last active June 9, 2024 19:58 — forked from patik/git-setup.sh
Git and Node with Zscaler proxy
#!/bin/sh
# Git proxy settings
echo "Configuring Git for compatibility with ZScaler..."
git config --global http.proxy http://gateway.zscaler.net:80/
git config --system http.proxy http://gateway.zscaler.net:80/
@mklement0
mklement0 / Out-FileUtf8NoBom.ps1
Last active August 16, 2024 05:32
PowerShell function that emulates Out-File for creating UTF-8-encoded files *without a BOM* (byte-order mark).
<#
Prerequisites: PowerShell version 3 or above.
License: MIT
Author: Michael Klement <[email protected]>
DOWNLOAD and DEFINITION OF THE FUNCTION:
irm https://gist.github.com/mklement0/8689b9b5123a9ba11df7214f82a673be/raw/Out-FileUtf8NoBom.ps1 | iex
The above directly defines the function below in your session and offers guidance for making it available in future
@amboutwe
amboutwe / yoast_seo_opengraph_change_image_size.php
Last active October 28, 2024 06:15
Code snippet to change or remove OpenGraph output in Yoast SEO. There are multiple snippets in this code.
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Change size for Yoast SEO OpenGraph image for all content
* Credit: Yoast Development team
* Last Tested: May 19 2020 using Yoast SEO 14.1 on WordPress 5.4.1
* Accepts WordPress reserved image size names: 'thumb', 'thumbnail', 'medium', 'large', 'post-thumbnail'
* Accepts custom image size names: https://developer.wordpress.org/reference/functions/add_image_size/
*/
@ann0see
ann0see / vpnserver.conf
Last active March 9, 2022 22:57
Fail2ban filter for SoftEther VPN server
# Fail2Ban filter for SoftEther authentication failures
# Made by quixrick and Nobody
# Thanks to quixrick from Reddit! https://reddit.com/u/quixrick
# Further reference: http://www.vpnusers.com/viewtopic.php?f=7&t=6375&sid=76707e8a5a16b0c9486a39ba34763901&view=print
[INCLUDES]
# Read common prefixes. If any customizations available -- read them from
# common.local
before = common.conf
[{A4BB2687-E63E-F424-F9F3-18D739053798}-DlgOrder]
Dlg0={A4BB2687-E63E-F424-F9F3-18D739053798}-SdWelcome-0
Count=6
Dlg1={A4BB2687-E63E-F424-F9F3-18D739053798}-SdAskDestPath-0
Dlg2={A4BB2687-E63E-F424-F9F3-18D739053798}-SdStartCopy2-0
Dlg3={A4BB2687-E63E-F424-F9F3-18D739053798}-SdAskDestPath-1
Dlg4={A4BB2687-E63E-F424-F9F3-18D739053798}-SdStartCopy2-1
Dlg5={A4BB2687-E63E-F424-F9F3-18D739053798}-SdFinish-0
[{A4BB2687-E63E-F424-F9F3-18D739053798}-SdWelcome-0]
Result=1
@mbbx6spp
mbbx6spp / ALTERNATIVES.adoc
Last active July 6, 2024 19:43
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
@skunkie
skunkie / rename_vm.sh
Created December 19, 2014 13:26
Shell script to rename a virtual machine in VMware ESXi
#!/bin/sh
# shell script to rename a virtual machine in ESXi
VOLNAME=$1
DIRNAME=$2
OLDNAME=$3
NEWNAME=$4
VM_DIRPATH="/vmfs/volumes/$VOLNAME/$DIRNAME"
f_OK() {