Skip to content

Instantly share code, notes, and snippets.

View siggiarni's full-sized avatar

Sigurður Árni Svanbergsson siggiarni

View GitHub Profile
#21cfc5
#f9c697
#e31519
<p>
Device width: <span id="device-width"></span>
</p>
<script>
var findDeviceWidth = function() {
var width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
document.getElementById('device-width').innerHTML = width;
};
window.onresize = findDeviceWidth;
Turn off certificate checking
$ npm config set strict-ssl false
Turn it back on
$ npm config set strict-ssl true

Browsers Checklist

Desktop

Mac

  • Safari
  • Chrome
  • Firefox
  • Opera
@siggiarni
siggiarni / notranslate.html
Last active August 29, 2015 14:21
Prevent the Google translate bar from displaying
<!-- http://davidwalsh.name/prevent-chrome-from-translating-page -->
<meta name="google" value="notranslate">
<body ontouchstart="">
...
</body>
<!-- https://stackoverflow.com/questions/3885018/active-pseudo-class-doesnt-work-in-mobile-safari -->
// Fast fullscreen
% defaults write -g NSWindowResizeTime -float 0.003
// Default speed
% defaults delete -g NSWindowResizeTime
// npm install browser-sync gulp-ruby-sass gulp-autoprefixer gulp-cssnano jshint gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-cache gulp-htmlmin del --save-dev
var gulp = require('gulp'),
browserSync = require('browser-sync').create(),
reload = browserSync.reload,
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
nano = require('gulp-cssnano'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
@siggiarni
siggiarni / xcode-agreement
Created December 28, 2015 17:28
Xcode license agreement
$ sudo xcodebuild -license