Skip to content

Instantly share code, notes, and snippets.

<link href="touch-icon-iphone.png" rel="apple-touch-icon-precomposed" />
<link href="touch-icon-ipad.png" rel="apple-touch-icon-precomposed" sizes="72x72" />
<link href="touch-icon-iphone4.png" rel="apple-touch-icon-precomposed" sizes="114x114" />
<link href="touch-icon-ipad3.png" rel="apple-touch-icon-precomposed" sizes="144x144" />
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Embedded SVG</title>
</head>
<body>
<h1>Embedded SVG</h1>
<a href="http://www.sitepoint.com/add-svg-to-web-page/">Source of this stuff.</a>
<!-- SVG code -->
@ianlintner-wf
ianlintner-wf / aliases.drushrc.php
Created February 3, 2014 16:35
SSH Public Key
<?php
$options['ssh-options'] = '-o PasswordAuthentication=no -i /home/YOURUSERNAME/.ssh/id_rsa';
@ianlintner-wf
ianlintner-wf / vhost.sh
Created March 24, 2014 17:49
Create a ideal vhost for drupal via shell script. Customize for your site / var web directory.
#!/usr/bin/env bash
tmpfile=/tmp/vhostfile
vhost=/etc/apache2/sites-available/$1
echo "creating $vhost for directory /var/sites/$2"
echo "<VirtualHost *:80>" > $tmpfile
echo " DocumentRoot /var/sites/$2" >> $tmpfile
echo " ServerName $1" >> $tmpfile
echo " RewriteEngine On" >> $tmpfile
echo " RewriteOptions inherit" >> $tmpfile
@ianlintner-wf
ianlintner-wf / pollpull.sh
Last active August 29, 2015 13:58
Poll the remote git repository using git fetch & then git status && pull from git hub based on the status of the branch.
#!/bin/bash
#Current (Remote) Branch
currentbranch=""
#Fetch from the remote branch
echo "polling..."
if [ -n "$currentbranch" ]; then
git fetch $currentbranch
else
@ianlintner-wf
ianlintner-wf / restore_db_dir.sh
Last active August 29, 2015 13:58
Read all mysql dumps in a directory and restore them to database that matches filename.
#!/bin/bash
#Load all mysql backups in directory
FILES=/you/restore/db/*.mysql
if [ ${#FILES[@]} -gt 0 ]; then
#Loop through files
for f in $FILES
do
#Alert the user
@ianlintner-wf
ianlintner-wf / makedev.sh
Created April 5, 2014 04:08
Takes a production drupal database and runs drush settings for dev
#!/bin/bash
drush vset cache 0
drush vset preprocess_css 0
drush vset preprocess_js 0
sudo drush dl drush --destination='/usr/share'
#!/bin/bash
#Load all mysql backups in directory to mysql
#database is filename
#drop existing database, import database
#clear database script folder
#
#Takes parameters $1 -u $2 username_value $3 -p $4 password_value (example for $files) -f database/folder/*.mysql
#Set $FILES value to location of your database file or use parameter $5 $6
#FILES="$6"