Skip to content

Instantly share code, notes, and snippets.

View Erutan409's full-sized avatar

Michael Keyser Erutan409

  • Grand Rapids, MI
View GitHub Profile
[{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
@ChuckMac
ChuckMac / WordPress Page-Post Linking Shortcode
Last active October 24, 2017 13:46
Simple WordPress shortcode for adding dymanic links to pages/posts
[pagelink page="8" title="Link Title" class="link-class"]
@Mihailoff
Mihailoff / AnObj.php
Created September 11, 2012 18:17
PHP Anonymous Object
<?php
/**
* PHP Anonymous Object
*/
class AnObj
{
protected $methods = array();
public function __construct(array $options)
@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() {
@lukaskonarovsky
lukaskonarovsky / dynamicarray.cpp
Created April 6, 2009 21:33
C++ dynamic array implementation
#include "dynamicarray.h"
using namespace std;
DynamicArray::DynamicArray() {
DynamicArray::DynamicArray(5);
}
DynamicArray::DynamicArray(int initSize) {
size = initSize;
@Evanion
Evanion / grid-push-pull.less
Last active October 26, 2021 08:57
Responsive push/pull for uikit
/* Small */
@media (max-width: @breakpoint-small-max) {
[class*='uk-push-small-'],
[class*='uk-pull-small-'] { position: relative; }
/*
* Push
*/
@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
@stsibel
stsibel / MySQL_zipcodes_within_radius.sql
Last active September 26, 2022 18:02
MySQL query to find zip-codes within given radius from any point (or zip-code)
/* Given table 'zipcodes' with columns:
zipcode, latitude, longitude.
Find zipcodes within radius from given zipcode.
EXAMPLE:
Coordinates for zip 91326 and radius 25 mi:
*/
SET @location_lat = 34.2766,
@location_lon = -118.544;
SELECT zipcode, ( 3959 * acos( cos( radians(@location_lat) ) * cos( radians( latitude ) ) * cos( radians( longitude ) - radians(@location_lon) ) + sin( radians(@location_lat) ) * sin( radians( latitude ) ) ) ) AS distance
@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>
@jnaskali
jnaskali / gist:2000102
Created March 8, 2012 10:08
PHP: Send XML over POST with cURL and save response
function sendXmlOverPost($url, $xml) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
// For xml, change the content-type.
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml"));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);