Skip to content

Instantly share code, notes, and snippets.

@mburtscher
mburtscher / screen.sh
Created April 25, 2013 16:17
Turn screen on/off if one of the specified machines is online.
#!/usr/bin/php
<?php
$hosts = array(
"192.168.10.11",
"192.168.10.12",
"192.168.10.13",
"192.168.10.14",
"192.168.10.15",
"192.168.10.16",
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PropertyChanged;
namespace Fody
{
[ImplementPropertyChanged]
@mburtscher
mburtscher / configure
Last active September 13, 2021 09:48
PHP configuration
#!/bin/sh
./configure \
--prefix=/opt/php-$1 \
--with-mysql \
--with-gd \
--enable-gd-native-ttf \
--with-freetype-dir=/usr/include/freetype2 \
--with-jpeg-dir \
--with-png-dir \
--with-xpm-dir \
#!/bin/sh
# Configuration
DNS_SERVER=8.8.8.8
GATEWAY=192.168.0.1
echo "PING $GATEWAY"
echo "============================================================"
ping -c 1 $GATEWAY
echo ''
@mburtscher
mburtscher / Google Calendar for Teams.gs
Last active April 2, 2024 16:01
Slack "Google Calendar for Teams" replacement
var webhookUrl = 'https://hooks.slack.com/services/…/…/…'; // Webhook URL
var calendarId = '…@group.calendar.google.com'; // Id of the calendar
var slackChannel = '#events'; // Name of Slack channel to post updates to
var threshold = 30; // Seconds to look back after "onEventUpdated" event was received
var messageWeeklySingle = 'There is *1 event* this week:';
var messageWeeklyMultiple = 'There are *{events} events* this week:';
var messageCreated = 'A *new event* has been created:';
function sendWeeklyEventsSummary()
{