This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vundle package manager | |
set nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" Vundle packages | |
Bundle 'gmarik/vundle' | |
Bundle 'maksimr/vim-jsbeautify' | |
Bundle 'einars/js-beautify' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOME="http://www.yourdomain.com/some/page" | |
DOMAINS="yourdomain.com" | |
DEPTH=2 | |
OUTPUT="./urls.csv" | |
wget -r --spider --delete-after --force-html -D "$DOMAINS" -l $DEPTH "$HOME" 2>&1 \ | |
| grep '^--' | awk '{ print $3 }' | grep -v '\. \(css\|js\|png\|gif\|jpg\)$' | sort | uniq > $OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void disableFullScreen(Shell shell) { | |
try { | |
Field windowField = Shell.class.getDeclaredField("window"); | |
windowField.setAccessible(true); | |
Object window = windowField.get(shell); | |
invoke(window.getClass(), window, "setCollectionBehavior", new Long[] { 0L }); | |
} catch (Exception e) { | |
log.error("couldn't disable full screen mode", e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.andyhawkes.gists; | |
import org.eclipse.swt.graphics.Image; | |
import org.eclipse.swt.graphics.ImageData; | |
import org.eclipse.swt.graphics.Rectangle; | |
import org.eclipse.swt.widgets.Display; | |
/** | |
* Simple class that demonstrates how to slice up regions of a sprite image in SWT, while preserving | |
* alpha transparency. There are shorter ways to do this if you don't care about alpha transparency. |
NewerOlder