Skip to content

Instantly share code, notes, and snippets.

View marcus-crane's full-sized avatar
💭
Online and logged on

Marcus Crane marcus-crane

💭
Online and logged on
View GitHub Profile
@marcus-crane
marcus-crane / email.sh
Last active September 22, 2016 05:18
A bash script for checking my raw emails received from an Amazon S3 bucket
#!/bin/bash
cd DIRECTORY
aws s3 sync s3://BUCKET_NAME .
for i in $( ls ); do
echo Name: $i
cat $i | grep "Subject: "
echo ""
done
@marcus-crane
marcus-crane / mingw-w64-4.0.4-osx10.11.2.sh
Last active July 5, 2023 02:46 — forked from cosmo0920/mingw-w64-4.0.4-osx10.11.2.sh
Script to install a Mingw-w64 Cross-Compiler Suite on Mac OS X 10.11.2 [ FIXED BREW LINK ]
#!/bin/sh
# dependencies
echo "Installing dependencies via Homebrew (http://brew.sh)"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)")"
brew update
brew tap homebrew/versions
@marcus-crane
marcus-crane / symconf.sh
Created April 14, 2017 09:11
Super basic script for symlinking nginx configs. Usage: ./symconf {filename}
#!/bin/bash
sudo ln -s /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/$1
@marcus-crane
marcus-crane / mediawiki_backup.sh
Last active August 18, 2017 10:20
A mediawiki backup script
#!/bin/bash
# Slight modification of https://www.mediawiki.org/wiki/Fullsitebackup
# Configuration
dbname="yourdb"
dbhost="localhost"
dbuser="username"
dbpw="password"
# Wiki location
@marcus-crane
marcus-crane / scp_copy
Last active August 16, 2017 02:08
An example of how to use scp with folder names that utilize spaces because I'm going to forget eventually
scp user@192.168.1.1:"~/Documents/A\ Folder/01\ An\ Audio\ Recording.mp3"
@marcus-crane
marcus-crane / sensors.html
Last active September 24, 2017 10:38
NEC Smart Cities sensor map
<!DOCTYPE html>
<html>
<head>
<title>NEC Smart Cities Sensors</title>
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css"
integrity="sha512-M2wvCLH6DSRazYeZRIm1JnYyh22purTM+FDB5CsyxtQJYeKq83arPe5wgbNmcFXGqiSH2XR8dT/fJISVA1r/zQ=="
crossorigin=""
/>
@marcus-crane
marcus-crane / middleware.py
Created November 18, 2017 10:37
Django 2.0 HTML Prettify Middleware
from html5print import HTMLBeautifier
class PrettifyMiddleware:
"""Prettify HTML for anyone interested in reading the source of this site."""
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
response = self.get_response(request)
if response['Content-Type'].split(';')[0] == 'text/html':
@marcus-crane
marcus-crane / keybase.md
Last active June 20, 2021 11:42
Keybase Verification

Keybase proof

I hereby claim:

  • I am marcus-crane on github.
  • I am marcuscrane (https://keybase.io/marcuscrane) on keybase.
  • I have a public key whose fingerprint is 15DC 6AC2 068B 5E35 8278 45D2 0066 202F 5187 A0C8

To claim this, I am signing this object:

@marcus-crane
marcus-crane / servers.md
Created December 20, 2017 05:45
Breakdown of the various VisualShower servers as early 2017 | From a dead reversing project
@marcus-crane
marcus-crane / arch.md
Created December 23, 2017 10:41
My updated Arch Linux install guide featuring some learnings

Installing Arch Linux on an Intel NUC (NUC5PPYH)

Getting online

It's that time again where I decide to reinstall Arch Linux and likely end up bashing my head against a wall. I have an old blog post on my Github but it could be better so this is an extended version mainly for my own future reference.

Please note that this isn't some guide for pros or that I expect to have the most 100% correct or efficient method of installing. It's just what I know works for me.

As I'm installing on an Intel NUC, I'm going to assume you might like it run it mainly via WiFi so we'll start by getting online. You can do this graphically by running wifi-menu.