Skip to content

Instantly share code, notes, and snippets.

Set updateSession = CreateObject("Microsoft.Update.Session")
updateSession.ClientApplicationID = "MSDN Sample Script"
Set updateSearcher = updateSession.CreateUpdateSearcher()
WScript.Echo "Searching for updates..." & vbCRLF
Set searchResult = _
updateSearcher.Search("IsInstalled=0 and Type='Software' and IsHidden=0")
@mbeall
mbeall / apache2.conf
Created February 3, 2016 06:37
Golden LAMP configuration (Ubuntu 14.04)
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
@mbeall
mbeall / post-type-labels.php
Created December 23, 2015 04:04
WordPress 4.4 Labels
<?php
$labels = array(
'name' => _x( '__POST__s', 'post type general name', 'steel' ),
'singular_name' => _x( '__POST__', 'post type singular name', 'steel' ),
'menu_name' => __( '__MENU__', 'steel' ),
'name_admin_bar' => __( '__POST__s', 'steel' ),
'add_new' => __( 'Add New', 'steel' ),
'add_new_item' => __( 'Add New __POST__', 'steel' ),
'edit_item' => __( 'Edit __POST__', 'steel' ),
'new_item' => __( 'New __POST__', 'steel' ),
@mbeall
mbeall / git-csscomb-sync
Last active September 23, 2016 21:11
Custom functions
#!/bin/bash
#
# Make sure all git repos are using the latest csscomb rules
# Uses Flint's rules as master
#
for repo in $(cat /usr/local/repos.git)
do
cd $repo
echo $(basename $repo)
@mbeall
mbeall / .bash_aliases
Last active September 23, 2016 21:02
Hidden files
alias rsync-ssh='rsync -az -e ssh'
@mbeall
mbeall / syntax.sh
Last active September 21, 2015 22:15
#!/bin/bash
find . -name '*.php' -not -path './node_modules/*' -not -path './tests/*' -not -path './vendor/*' -exec php -lf '{}' \;
@mbeall
mbeall / .htaccess
Last active August 29, 2015 14:25
fcc-signup extras class
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_flag log_errors on
RewriteEngine On
RewriteRule ^extra/([^/]*)$ /fcc-signup/extras.php?id=$1 [L]
<?php
/* lookforbadguys.php 2011-09-27
Copyright (C)2011 Karen Chun, Steven Whitney.
Initially published by http://25yearsofprogramming.com.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License (GPL)
Version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@mbeall
mbeall / blog-suspended.php
Created May 23, 2015 04:37
Suspended Blog/Website
<!DOCTYPE html>
<!--[if lt IE 9]><html lang="en-US" class="ie"><![endif]-->
<!--[if gte IE 9]><!--><html lang="en-US"><!--<![endif]-->
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Site Suspended</title>
<link rel="profile" href="http://gmpg.org/xfn/11">
<!--[if lt IE 9]>
@mbeall
mbeall / vws_sprint_jan26.md
Last active August 29, 2015 14:13
Vuyiroli sprint backlog

Content Updates

  • Update $3/day to $4 and include pounds and rupees
  • Make sure new content is accessible from home page

Programs

  • 100 beds (currently 60)
  • Ambulance
  • Ongoing care

Site speed