Skip to content

Instantly share code, notes, and snippets.

View skwashd's full-sized avatar
👨‍💻
planning, coding, reviewing

Dave Hall skwashd

👨‍💻
planning, coding, reviewing
View GitHub Profile
<?php
$aliases['local'] = array(
'uri' => 'http://dev.example.com',
'root' => '~/www',
);

Keybase proof

I hereby claim:

  • I am skwashd on github.
  • I am skwashd (https://keybase.io/skwashd) on keybase.
  • I have a public key ASAUrgIZThxTFcSHZzGTbnA0p3UmUkVHGodY39XYP6ZDewo

To claim this, I am signing this object:

@skwashd
skwashd / README.md
Last active September 12, 2020 18:01
Export stored passwords from Google Chrome to 1Password

This code snippet is for exporting passwords stored in Google Chrome for use in 1Password. It generates a 1Password compatiable CSV file.

NOTE: Your password are exported as plain text. Take proper precautions when storing the file and use a secure deletion tool.

To export your passwords follow these steps:

  • visit chrome://settings-frame/passwords
  • Open the Chrome console (Mac: [Cmd] + [Option] + J / Windows or Linux: [Ctrl] + [Shift] + J`)
from robot import Robot
from ultrasonic import Ultrasonic
us = Ultrasonic(13, 15)
rbt = Robot(us)
rbt.auto_pilot()
@skwashd
skwashd / ruleset.xml
Created October 21, 2016 15:36
Combined Drupal Coding and Best Practice Standards Ruleset for PHP CodeSniffer
<?xml version="1.0"?>
<ruleset name="Combined Drupal Standard">
<rule ref="Drupal" />
<rule ref="DrupalPractice" />
</ruleset>
@skwashd
skwashd / resources.md
Last active November 13, 2016 10:18
DrupalCon Dublin: Let the Machines do the Work
@skwashd
skwashd / README.md
Last active May 27, 2020 07:24
Drupal git pre-commit hook

This pre-commit hook is designed to be used for Drupal 7 and 8 sites.

Download the pre-commit file. Save it as .git/hook/pre-commit in your git repo. You need to ensure that the file is executable.

If you want this to be added to all new projects automatically, add it to your git init templates.

To install and PHP CodeSniffer for Drupal, please read the official documentation.

To see this working checking out this short YouTube video.

@skwashd
skwashd / .travis.yml
Created June 29, 2016 13:05
Incrementally improve your Drupal code
language: php
sudo: false
php:
- 5.6
install:
# Remove xdebug to make composer faster.
- phpenv config-rm xdebug.ini
@skwashd
skwashd / README.md
Last active January 15, 2022 15:29
Auto starting minecraft server in a docker container on Ubuntu 16.04

The better way to do this

During a twitter conversation with itzg, he suggested that I use [docker's built in --restart="unless-stopped" runtime flag] (https://gist.github.com/itzg/36e59186f6195a445f1f1fa2b0087ea9). That worked a treat and means I don't need to maintain an extra service.

My old way of doing it

This is only retained for historic record. Don't follow these steps.

If you want to run a minecraft server in a docker container on Ubuntu 16.04 and have it automatically start at boot, follow these steps:

@skwashd
skwashd / node--blog.tpl.php
Created May 7, 2016 18:11
preprocessor example
<div>
<?php print $name_of_var; ?>
</div>