Skip to content

Instantly share code, notes, and snippets.

Camilla Krag Jensen naxoc

Block or report user

Report or block naxoc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am naxoc on github.
  • I am naxoc (https://keybase.io/naxoc) on keybase.
  • I have a public key whose fingerprint is 389E 797D DA66 7806 51FD C5AD BE2D 9138 37E2 5687

To claim this, I am signing this object:

@naxoc
naxoc / unused-images.sh
Created Oct 28, 2013
Script that looks at all images in a given location and checks if there are any references to each image. Useful for checking if images are being used by CSS for instance.
View unused-images.sh
#!/bin/bash
DIR=.
if [ -n "$1" ]
then
DIR=$1
fi
# Find image files in.
FILES=`find $DIR -type f | grep ".*\.\(jpg\|gif\|png\|jpeg\)"`
@naxoc
naxoc / gist:5016407
Created Feb 22, 2013
Relative line numbers in vim
View gist:5016407
" Relative numbers in normal mode - absolute in insert mode.
autocmd InsertEnter * :set number
autocmd InsertLeave * :set relativenumber
@naxoc
naxoc / pre-commit
Created Nov 26, 2012
Drupal git commit hook
View pre-commit
#!/usr/bin/php
<?php
/**
* @file
* This is a Git pre-commit hook that informs you when you are
* about to commit whitespace or a debug function.
*/
$red = "\033[1;31m";
$red_end = "\033[0m";
@naxoc
naxoc / gist:2643340
Created May 9, 2012
CtrlP config for vim
View gist:2643340
" I like it better when the filename is used for the search. Toggle this with
" <c-d>
let g:ctrlp_by_filename = 1
" Map the buffer switcher.
map <leader>b :CtrlPBuffer<cr>
" Map the recent files.
map <leader>r :CtrlPMRUFiles<cr>
" Map find-tag-in-buffer.
map <leader>t :CtrlPBufTag<cr>
" Map find-tag-in-all-buffers.
You can’t perform that action at this time.