Skip to content

Instantly share code, notes, and snippets.

View mkober's full-sized avatar

Mark Koberlein mkober

View GitHub Profile
@mkober
mkober / wordpress-install.sh
Created January 25, 2021 03:45
Shell Script to Install WordPress on Repl.it
#!/bin/bash
# Source: https://repl.it/talk/learn/Installing-WordPress-on-Replit/34284
mkdir Work
cd Work
wget http://archive.ubuntu.com/ubuntu/pool/main/p/php7.2/php7.2-mysql_7.2.3-1ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/p/php7.2/php7.2-sqlite3_7.2.3-1ubuntu1_amd64.deb
wget https://wordpress.org/latest.zip
@mkober
mkober / windows-symlinks.md
Last active February 11, 2024 16:42
Creating Symbolic Links on Windows
@mkober
mkober / .profile
Created January 6, 2020 05:18
EC2 User Profile
# fin - command line TODO list
# https://medium.com/@sambrin/fin-command-line-todo-list-made-with-30a2346de068
# Notes
# 1. Original find didn't work properly on AWS
# find ${TASKS_DIR} -not -path '*/\.*' -type f -execdir echo '{}' ';' | nl -s '[] ' -b n
BOLD_AND_UNDERLINED="\e[1;4m"
GREEN="\e[32m"
STANDARD="\e[0m"
TODO_LIST_LABEL="\n — — — — — — — — — — — -TODO — — — — — — — — — — — — -\n"
@mkober
mkober / server.js
Created January 6, 2020 04:48
Node.js Web Server and Watcher
const connect = require('connect');
const finalhandler = require('finalhandler');
const serveStatic = require('serve-static');
const path = require('path');
const winston = require('winston');
const sassMiddleware = require('node-sass-middleware')
const http = require('http');
const hound = require('hound')
const cpx = require("cpx");
@mkober
mkober / router.php
Created December 2, 2017 17:49
Wordpress Router for PHP Built-in Web Server
<?php
// Extracted from the `wp-cli` project. https://wp-cli.org/
$root = $_SERVER['DOCUMENT_ROOT'];
$path = '/'. ltrim( parse_url( urldecode( $_SERVER['REQUEST_URI'] ) )['path'], '/' );
if ( file_exists( $root.$path ) ) {
// Enforces trailing slash, keeping links tidy in the admin
cd /Library/Preferences
sudo rm com.sophos.sav.plist

cd /Library/Application\ Support/Sophos/cloud/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer —force_remove
# Recursively add a .keep file in order to track empty folders in git
find . -type d -exec touch {}/.keep \;
@mkober
mkober / .gitignore
Created February 17, 2017 17:35
.gitignore for WordPress - originally written by @salcode
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20160309
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
// SmoothScroll for websites v1.2.1
// Licensed under the terms of the MIT license.
// People involved
// - Balazs Galambosi (maintainer)
// - Michael Herf (Pulse Algorithm)
(function(){
// Scroll Variables (tweakable)
@mkober
mkober / designer.html
Created July 30, 2014 20:44
designer
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
#core_scaffold {
position: absolute;
top: 0px;
right: 0px;