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>
NoMethodError in ReviewsController#preview
undefined method `to_sym' for nil:NilClass
Extracted source (around line #59):
57
58
59
60
61
62
Stevens-MacBook-Air-2:testivate steven$ heroku logs --app testivate
2015-06-21T06:14:36+00:00 app[heroku-postgres]: source=HEROKU_POSTGRESQL_SILVER sample#current_transaction=35588211 sample#db_size=307467384bytes sample#tables=21 sample#active-connections=5 sample#waiting-connections=0 sample#index-cache-hit-rate=0.95747 sample#table-cache-hit-rate=0.84423 sample#load-avg-1m=0.07 sample#load-avg-5m=0.105 sample#load-avg-15m=0.135 sample#read-iops=0 sample#write-iops=0.20825 sample#memory-total=7629452kB sample#memory-free=567436kB sample#memory-cached=6285748kB sample#memory-postgres=261260kB
2015-06-21T06:14:46.971712+00:00 heroku[router]: at=info method=GET path="/" host=testivate.com request_id=f2784ec8-d110-4799-8657-4d631e724d28 fwd="180.76.15.7" dyno=web.1 connect=0ms service=9ms status=301 bytes=180
2015-06-21T06:14:51.016279+00:00 app[web.1]: Started GET "/" for 101.176.176.218 at 2015-06-21 06:14:51 +0000
2015-06-21T06:14:51.482251+00:00 app[web.1]: Processing by HighVoltage::PagesController#show as
<?php
function url2png_v6($url, $args) {
# Get your apikey from http://url2png.com/plans
$URL2PNG_APIKEY = "PXXXX";
$URL2PNG_SECRET = "SXXXX";
# urlencode request target
$options['url'] = urlencode($url);
/**
* 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.