Skip to content

Instantly share code, notes, and snippets.

ssddanbrown / index.html
Last active Aug 29, 2015
Simple HTML Text Testing Example Using Iframes + Jquery
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<script src=""></script>
<script type="text/javascript" src=""></script>
ssddanbrown / smooth-scroll.js
Last active Feb 14, 2016
Simple Jquery Plugins
View smooth-scroll.js
* Smoothly scrolls to elements it's called upon
* Returns Jquery object for chaining
$.fn.smoothScrollTo = function(speed, offset) {
if (typeof speed === 'undefined') speed = 800;
if (typeof offset === 'undefined') offset = 100;
$('html, body').animate({
scrollTop: this.offset().top - offset // Adjust to change final scroll position top margin
}, speed); // Adjust to change animations speed (ms)
ssddanbrown / html-document.html
Created Jan 25, 2015
Mulitple Google Captchas
View html-document.html
<!--Remote Google Script-->
<script src="" async defer></script>
<!--Local site script-->
var onCaptchaLoad = function() {
var captchaElements = document.querySelectorAll('div[data-captcha="true"]');
for (var i = captchaElements.length - 1; i >= 0; i--) {
grecaptcha.render(captchaElements[i], {
'sitekey': 'SITE_KEY',
'theme': 'light'
ssddanbrown / gulpfile.js
Last active Dec 9, 2021
Simple gulp sass+typescript+livereload
View gulpfile.js
var gulp = require('gulp');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var livereload = require('gulp-livereload');
var sourcemaps = require('gulp-sourcemaps');
var cleanCss = require('gulp-clean-css');
var ts = require('gulp-typescript');
var paths = {
cssSrc: 'styles/*.scss',
ssddanbrown / game.js
Created Mar 15, 2015
Wall Dodge Javascript Game
View game.js
* Dodge the walls using WAD for movement.
* Credit to Mary Rose -
* for the walkthrough
(function() {
var Game = function(canvasId) {
var canvas = document.getElementById(canvasId);
var screen = canvas.getContext('2d');
ssddanbrown / post-recieve
Created Apr 11, 2015 Laravel Deploy Script
View post-recieve
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 /
Last active Mar 14, 2021
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 / trello-style-overrides.css
Last active Jun 3, 2016
Trello dark theme style overrides
View trello-style-overrides.css
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url( 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 / gist:0720705f9e8af9af5a83
Created Mar 6, 2016
Docker maria db BookStack Testing Command
View gist:0720705f9e8af9af5a83
docker run --name mariadb -p -e MYSQL_ROOT_PASSWORD=bookstack -e MYSQL_DATABASE=bookstack -e MYSQL_USER=bookstack -e MYSQL_PASSWORD=bookstack -d mariadb:latest
ssddanbrown / bookstack-nginx-proxy-conf
Last active Aug 20, 2016
BookStack url sub-path config
View bookstack-nginx-proxy-conf
# This sets the name 'bookstack' to point locally on port 3002
# and is used on line 19 below.
upstream bookstack { server; }
# 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.