Skip to content

Instantly share code, notes, and snippets.

View vnys's full-sized avatar

Victor Nystad vnys

View GitHub Profile
@vnys
vnys / how-to.md
Last active August 29, 2015 14:05
moving wordpress to localhost running mamp
  • symlink htdocs:
cd /Applications/MAMP/
ln -s /Users/<username>/Code/<wp-site> ./htdocs
  • Import database using phpmyadmin
  • Update settings in wp-config.php
  • Rename wp_options > siteurl to localhost:8888
@vnys
vnys / script.js
Created September 26, 2014 09:42
C3 graphs from Google Spreadsheets with tabletop.js
The [Google Spreadheetfile](https://docs.google.com/spreadsheets/d/1d03vSAqzfAXTH7IRRGwUt-ynK9IOlf4jmWwI0MMW4JA/edit#gid=0) must have two sheets, one called data and one called meta
@vnys
vnys / gulpfile.js
Last active August 29, 2015 14:07
Get latest arena files
var gulp = require('gulp');
var git = require('git-tools');
var tap = require('gulp-tap');
var path = require('path');
var del = require('del');
var Promise = require('es6-promise').Promise;
var latest = '';
gulp.task('arena', ['get:arenaversion'], function () {
@vnys
vnys / googleCalendar.md
Created October 13, 2014 08:00
Get 10 weeks view in Google Calendar
  • open Google Calendar
  • Go to settings
  • Paste into console:
(function(el){el.setAttribute('value', 'custom,70');el.childNodes[0].nodeValue = '10 Weeks'})(document.querySelector('#customModeSelect option:last-child'))
  • Select 10 weeks in dropdown
  • Click save
  • Return to calendar
@vnys
vnys / de-disruptify.md
Last active August 29, 2015 14:07
Make working with our newspapers less disruptive

Disable ad-loading for faster page loads:

  • ?ads=placeholder

Disable page reload so you don’t lose your console code

api.pageRefresh.clear()

Replace lowercase characters with the previous ascii character to make text unreadable

@vnys
vnys / Lipsumify.markdown
Last active August 29, 2015 14:07
A Pen by Victor Nystad.
@vnys
vnys / Array-to-Object.markdown
Created October 17, 2014 10:05
A Pen by Victor Nystad.
@vnys
vnys / Objects-to-string.markdown
Created October 19, 2014 19:42
A Pen by Victor Nystad.
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'