Skip to content

Instantly share code, notes, and snippets.

View ssddanbrown's full-sized avatar

Dan Brown ssddanbrown

View GitHub Profile
@ssddanbrown
ssddanbrown / download-random-unsplash-images.sh
Created December 6, 2017 16:45
Get a set of random unsplash images
#!/bin/bash
for i in {1..40}; do wget https://picsum.photos/600/400/\?random -O "$(ls -l | wc -l).jpg"; done
@ssddanbrown
ssddanbrown / docker-compose.yml
Created October 6, 2017 19:43
BookStack Docker Compose Dev
version: '3'
services:
web:
image: "ssddanbrown/docker-ubuntu-php7"
ports:
- "8080:8080"
depends_on:
- "database"
volumes:
- ./:/app
@ssddanbrown
ssddanbrown / subl.js
Created August 22, 2017 19:58
Sublime Text Project Manager Script
#!/usr/bin/env node
// Imports
const fs = require('fs');
const path = require('path');
const exec = require('child_process').exec;
// Config
const storeFolder = path.join(process.env.HOME, '.config/sublime-projects');
const sublimePath = '/opt/sublime_text/sublime_text'
curl -L https://github.com/ssddanbrown/haste/releases/download/v0.2.2/haste-osx-amd64 > haste && chmod a+x haste && sudo mv haste /usr/bin/haste
@ssddanbrown
ssddanbrown / bookstack-nginx-proxy-conf
Last active August 20, 2016 12:24
BookStack url sub-path config
# This sets the name 'bookstack' to point locally on port 3002
# and is used on line 19 below.
upstream bookstack { server 127.0.0.1:3002; }
# This is the main server setup that users access
# If you have existing sites and you are adding bookstack on a
# 'subdirectory' you may have to combine this with your existing configuration.
server {
listen 80;
# If copying this whole section you will have to change this to your domain or IP.
@ssddanbrown
ssddanbrown / gist:0720705f9e8af9af5a83
Created March 6, 2016 12:35
Docker maria db BookStack Testing Command
docker run --name mariadb -p 127.0.0.4:6060:3306 -e MYSQL_ROOT_PASSWORD=bookstack -e MYSQL_DATABASE=bookstack -e MYSQL_USER=bookstack -e MYSQL_PASSWORD=bookstack -d mariadb:latest
@ssddanbrown
ssddanbrown / trello-style-overrides.css
Last active June 3, 2016 14:26
Trello dark theme style overrides
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v15/CWB0XYA8bzo0kSThX0UTuA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
body {
background-size:cover !important;
@ssddanbrown
ssddanbrown / Instructions.md
Last active March 14, 2021 11:57
Visual Studio Code Linux Desktop File

How to use

  1. Follow the linux documentation found here to install Visual Studio Code.
  2. Copy the contents of code.desktop to ~/.local/share/applications/code.desktop
  3. Change /home/dan/Apps/vsc in the code.desktop file to the location you extracted the application to.

This how only been tested by myself on ElementaryOS Freya.

@ssddanbrown
ssddanbrown / post-recieve
Created April 11, 2015 11:07
iwanttolearn.io Laravel Deploy Script
#!/bin/sh
project=/var/www/iwanttolearn.io
GIT_WORK_TREE=$project git checkout -f
cd $project
composer install --no-dev --optimize-autoloader
php artisan migrate --force
php artisan cache:clear
php artisan route:cache
gulp --production
@ssddanbrown
ssddanbrown / game.js
Created March 15, 2015 23:43
Wall Dodge Javascript Game
/**
* Dodge the walls using WAD for movement.
*
* Credit to Mary Rose - https://vimeo.com/105955605
* for the walkthrough
*/
(function() {
var Game = function(canvasId) {
var canvas = document.getElementById(canvasId);
var screen = canvas.getContext('2d');