Skip to content

Instantly share code, notes, and snippets.

View johnantoni's full-sized avatar

John Griffiths johnantoni

View GitHub Profile
// svg background with png fallback
@mixin svg-background($file) {
$imagePNG: "#{$file}.png";
$imageSVG: "#{$file}.svg";
background: transparent image-url($imagePNG) 0 0 no-repeat;
height: image-height($imagePNG);
width: image-width($imagePNG);
text-indent: 100%;
white-space: nowrap;
@johnantoni
johnantoni / install-bitlbee.md
Last active August 29, 2015 13:57
install bitlbee
wget http://get.bitlbee.org/src/bitlbee-3.2.1.tar.gz
tar xvfz bitlbee-3.2.1.tar.gz|tar xf -
cd bitlbee-3.2.1
mkdir ~/.bitlbee
./configure --prefix=$HOME/.bitlbee --skype=1 --ssl=gnutls
make
make install
make install-etc

screen -S ./start-bitlbee.sh

@johnantoni
johnantoni / psych.rb
Created April 4, 2014 16:49
heroku psych vulnerability
heroku run "ruby -rpsych -e \"p Psych.libyaml_version.join('.')\"" -a [appname]
@johnantoni
johnantoni / dimensions.md
Last active August 29, 2015 13:58
responsive screen dimensions

Mobile:

  • Nexus 5 -- 1080 x 1920 pixels -- more -- (SMALL)
  • Windows Phone -- 768 x 1280 pixels -- more -- (SMALL)
  • iPhone 4S -- 640 x 960 pixels -- more -- (SMALL)
  • iPhone 5 -- 640 x 1136 pixels -- more -- (SMALL)

Tablet:

  • Nexus 7 v1 -- 1280x800 pixels -- more -- (MEDIUM)
  • Nexus 7 v2 -- 1920x1200 pixels -- more -- (MEDIUM)
  • iPad Mini -- 2048×1536 pixels -- more -- (MEDIUM)
@johnantoni
johnantoni / formatusb.md
Last active August 29, 2015 14:00
format +2GB usb stick on raspberry pi / beaglebone

create drive

sudo -s
dd if=/dev/zero of=/dev/sda bs=512 count=1
parted -s /dev/sda mklabel gpt
parted -s /dev/sda mkpart primary ext4 4M 100%
partprobe /dev/sda
mkfs.ext4 /dev/sda
reboot
@johnantoni
johnantoni / gulpfile.js
Created May 4, 2014 01:43
optimize assets, css, js.
var gulp = require('gulp'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
clean = require('gulp-clean'),
minifyCSS = require('gulp-minify-css'),
imagemin = require('gulp-imagemin'),
pngcrush = require('imagemin-pngcrush');
var paths = {
scripts: [
@johnantoni
johnantoni / ssh.txt
Last active August 29, 2015 14:01
securing ssh
# Change to no to disable tunnelled clear text passwords -
# PAY ATTENTION TO THE FOLLOWING OPTION!!! IT MAY PREVENT ACCESS TO YOUR SERVER;
# BEFORE APPLYING, MAKE SURE YOU HAVE DIRECT ACCESS TO YOUR SERVER (aka "your server sits next to you")
PasswordAuthentication no
# Maximum Login Attempts
MaxAuthTries 3
# root can't login via SSH
PermitRootLogin no
@johnantoni
johnantoni / Gemfile
Created June 2, 2014 14:44
bazooka mail-preview
# add to development group
gem 'mail_view', '~> 2.0.4'