Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View markwk's full-sized avatar
🎯
Focusing

Mark Koester markwk

🎯
Focusing
View GitHub Profile
@markwk
markwk / 2010-03-23-Install-Screen.log
Created March 22, 2011 17:08
2010-03-23-nginx-for-drupal-failed-install-command-line-copy-log
nginx-for-drupal# bash BARRACUDA.sh.txt
Barracuda [Wed Mar 23 00:49:06 HKT 2011] ==> STATUS: This script is ran as a root user.
Barracuda [Wed Mar 23 00:49:06 HKT 2011] ==> STATUS: Stop the cron and wait 5 sec.
Barracuda [Wed Mar 23 00:49:11 HKT 2011] ==> INFO: Install or upgrade checking, please wait...
Barracuda [Wed Mar 23 00:49:14 HKT 2011] ==> INFO: INIT...
Barracuda [Wed Mar 23 00:49:14 HKT 2011] ==> INFO: We need to install wget, axel, netcat & git first, please wait...
Barracuda [Wed Mar 23 00:49:38 HKT 2011] ==> INFO: We will use forced GitHub mirror without testing connection
Barracuda [Wed Mar 23 00:49:41 HKT 2011] ==> INFO: GitHub mirror repository will be used for this install
Barracuda [Wed Mar 23 00:49:41 HKT 2011] ==> INFO: Fix for possibly broken git-core after upgrade to version: 1:1.5.6.5-3+lenny3.1
Barracuda [Wed Mar 23 00:49:44 HKT 2011] ==> INFO: Downloading little helpers, please wait...
@markwk
markwk / aegir-install.log
Created March 22, 2011 17:15
2010-03-23- /opt/tmp/aegir-install.log
cat /opt/tmp/aegir-install.log
Reading package lists...
Building dependency tree...
Reading state information...
lsb-release is already the newest version.
dnsutils is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Hit http://tw.archive.ubuntu.com lucid Release.gpg
Hit http://mirror.ourdelta.org lucid Release.gpg
Hit http://tw.archive.ubuntu.com lucid-updates Release.gpg
@markwk
markwk / about.md
Created August 9, 2011 17:37 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@markwk
markwk / gist:1210701
Created September 12, 2011 06:37
Initial Description of OG_Clone
Description:
OG Clone Module allows you clone the content of a Drupal organic group and redeploy in a new group.
1.) Generic Clone Function, which will copy and clone all the nodes associated with a group.
2.) OG Clone specifications:
-Copy all nodes associated by default
-Option to only clone per feature
-Option to only clone nodes by author/user.
-Option to rename node creator
@markwk
markwk / local.settings.php
Created September 28, 2011 16:39
Adds multilingual variables
/**
* Multilingual settings
*
* This is a collection of variables that can be set up for each language when i18n is enabled.
* These are the basic ones for Drupal core, but you can add your own here.
*/
$conf['i18n_variables'] = array(
// Site name, slogan, mission, etc..
'site_name',
'site_slogan',
@markwk
markwk / read_daily_word_count_scores.py
Created December 7, 2017 02:54
Scripts for Stats from WordCounter App for Mac
# Python Script for Word Counter for Mac
# Collects Daily Score
import plistlib
import os
import time
def add(x, y): return x + y
today = time.strftime("%Y-%m-%d")
@markwk
markwk / rescuetime_running.py
Created October 31, 2018 12:18
Python Script for Mac to Check if a process is running. If not, restart and post a notification.
#!/usr/bin/env python
"""
Check to see if an process is running. If not, restart.
Run this in a cron job
"""
import os
import subprocess
# notification via osascript
# TODO: Is there a better way to do this?
@markwk
markwk / reboot_ec2.py
Created November 17, 2018 06:29
Reboot an ec2 instance using python and boto3
# -*- coding: utf-8 -*-
##############################################
# Reboot an ec2 instance using python and boto3
#
# Boto3 Documenation Reference:
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.reboot_instances
##############################################
import boto3
s3 = boto3.client(
@markwk
markwk / writings-tracking-with-git.bash
Last active April 18, 2024 13:41
My Writings Tracker with Git: A bash script for tracking my writings in plain tex files, calculate stats like word count, hashtags and new files, store stats to csv and commit to git.
#!/bin/bash
##################################
#
# THE ARCHIVE TRACKER
#
# REF: https://gist.github.com/markwk/c85a8a72bc8c03d0f510262bb5219a34/
#
# INTRODUCTION:
# Daily script to navigate to a directory of plain text files,
# add files to git repo, calculate key stats, store stats to csv
@markwk
markwk / daily_morning_pages_template_note.sh
Created November 25, 2018 03:17
Generate plain text markdown file for morning pages.
#!/bin/bash
# Bash script to generate a daily morning pages template
# includes file name and various date references
cd /Users/markkoester/Library/Mobile\ Documents/9CR7T2DMDG~com~ngocluu~onewriter/Documents/Notes_TheArchive
file_date=$( date '+%Y-%m-%d' )
filename="mp_$file_date.md" # prepending mp to files named according to date.
if [ -f $filename ]