Skip to content

Instantly share code, notes, and snippets.

View snoblenet's full-sized avatar

Steven Noble snoblenet

View GitHub Profile
@snoblenet
snoblenet / warn.vim
Last active May 5, 2017 04:08
Caps Lock and Insert mode warning for Vim
" ensure you have xset in your shell
" change 'solarized' to the name of your colorscheme
" presumes that your colorscheme, like solarized, provides both dark and light modes
function! CapsWarn()
let CapsState = system('xset -q | grep -oE "Caps Lock: on"')
if CapsState =~ "on"
highlight Normal ctermbg=Red
redraw
sleep 100m
@snoblenet
snoblenet / aremi-location-dictionary.json
Last active April 30, 2017 01:25
Australian (national market) power station location dictionary
AREMI_LOCATION_DICTIONARY = {
'Hallett Power Station': 'SA',
'West Nowra Landfill Gas Power Generation Facility': 'NSW',
'Somerton Power Station': 'Vic',
'Angaston Power Station': 'SA',
'Awaba Power Station': 'NSW',
'Bald Hills Wind Farm': 'Vic',
'Bankstown Sports Club Plant Units ': 'NSW',
'Banimboola Power Station': 'Vic',
'Barcaldine Power Station': 'QLD',
{
"name": "testivate-research-gigs",
"version": "1.0.0",
"description": "Earn money by testing websites",
"main": "main.js",
"scripts": {
"start": "electron main.js"
},
"keywords": [
"Testivate",
'use strict';
// Module to control application life.
const electron = require('electron');
// Module to create native browser window.
const app = electron.app;
body {
margin: 0;
}
#sidebar {
border-right: 1px solid gray;
vertical-align: top;
}
#container {
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link href="fonts.css" rel="stylesheet" type="text/css"/>
<link href="index.css" rel="stylesheet" type="text/css"/>
<title>Testivate Research Gigs</title>
<script></script>
</head>
<body>
/**
* WkHtmlToPdf table splitting hack.
*
* Forked and edited to include my own values
*
* Script to automatically split multiple-pages-spanning HTML tables for PDF
* generation using webkit.
*
* To use, you must adjust pdfPage object's contents to reflect your PDF's
* page format.
@snoblenet
snoblenet / gist:5974767
Created July 11, 2013 11:47
spec_helper.rb
require "rubygems"
# require "spork"
require "database_cleaner"
# require "ruby-debug"
# require "pry"
# require "plymouth" # automatically drops a failing test into a pry session, but doesn't work with zues/parallel_tests
#uncomment the following line to use spork with the debugger
#require "spork/ext/ruby-debug"
@snoblenet
snoblenet / gist:5974761
Created July 11, 2013 11:46
competitor_spec.rb
require "spec_helper"
describe "competitor" do
before :each do
@element = Element.create! :name => "meta", :meta => true
@standard = Standard.create! :name => "meta", :meta => true, :description => "meta"
@search = Product.create! :name => "Retail Site Search"
@mispellings = @search.questions.create! :description => "Cope with mispellings?", :element_id => @element.id, :standard_id => @standard.id, :active => true
@review = @search.reviews.create! :client_name => "BHP", :url => "http://bhp.com.au"
@snoblenet
snoblenet / gist:5974751
Created July 11, 2013 11:45
survey_spec.rb
require "spec_helper"
describe "survey" do
before :each do
@element = Element.create! :name => "meta", :meta => true
@standard = Standard.create! :name => "meta", :meta => true, :description => "meta"
@search = Product.create! :name => "Retail Site Search"
@mispellings = @search.questions.create! :description => "Cope with mispellings?", :instructions => "On the homepage, there is:", :element_id => @element.id, :standard_id => @standard.id, :active => true
@f1 = @mispellings.fields.create! :name => "Best practice", :points => 3.0