Skip to content

Instantly share code, notes, and snippets.

View danfrost's full-sized avatar
💭
Wishing to code more...

Dan Frost danfrost

💭
Wishing to code more...
  • London, England
View GitHub Profile
Review Sentiment
So there is no way for me to plug it in here in the US unless I go by a converter. 0
Good case, Excellent value. 1
Great for the jawbone. 1
Tied to charger for conversations lasting more than 45 minutes.MAJOR PROBLEMS!! 0
The mic is great. 1
I have to jiggle the plug to get it to line up right to get decent volume. 0
If you have several dozen or several hundred contacts, then imagine the fun of sending each of them one by one. 0
If you are Razr owner...you must have this! 1
Needless to say, I wasted my money. 0
@danfrost
danfrost / whisper.rb
Created January 29, 2015 15:10
News Whisperer
#!/usr/bin/ruby
require 'rss'
require 'open-uri'
puts "Let me read you a story..."
strings = []
url = 'http://feeds.bbci.co.uk/news/world/rss.xml'
open(url) do |rss|
feed = RSS::Parser.parse(rss)
feed.items.each do |item|
strings.push "#{item.title}"
@danfrost
danfrost / asdf
Created January 29, 2015 15:10
Whispering news
asdfasdf
This file has been truncated, but you can view the full file.
The Project Gutenberg EBook of The Complete Works of William Shakespeare, by
William Shakespeare
This eBook is for the use of anyone anywhere at no cost and with
almost no restrictions whatsoever. You may copy it, give it away or
re-use it under the terms of the Project Gutenberg License included
with this eBook or online at www.gutenberg.org
** This is a COPYRIGHTED Project Gutenberg eBook, Details Below **
** Please follow the copyright guidelines in this file. **
/*
This is just for reference.
To use me:
npm install bleno
node peripheral.js
*/
var bleno = require('bleno');
var now = Date.now();
@danfrost
danfrost / .watchr
Created November 20, 2013 10:06
Basic watchr file
def run_spec(file)
unless File.exist?(file)
puts "#{file} does not exist"
return
end
puts "Running #{file}"
system "bundle exec rspec #{file}"
puts
end
@danfrost
danfrost / tuning-primer.sh
Created November 9, 2013 21:55
tuning-primer.sh. Can't remember where I got this from.
#!/bin/sh
# vim: ts=8
#########################################################################
# #
# MySQL performance tuning primer script #
# Writen by: Matthew Montgomery #
# Report bugs to: https://bugs.launchpad.net/mysql-tuning-primer #
# Inspired by: MySQLARd (http://gert.sos.be/demo/mysqlar/) #
# Version: 1.6-r1 Released: 2011-08-06 #
sudo apt-get install -y puppet
git clone https://github.com/3ev/bobbypuppet /var/local # << where??
sudo puppet apply --... /var/local/bobbypuppet/manifests/init.pp
# now just checkout projects
@danfrost
danfrost / gist:1772688
Created February 8, 2012 19:31
Latest stable
a28d5c34f6628eeba492d1e2eca71336233f07c7
@danfrost
danfrost / customise.php
Created November 29, 2011 12:40
How to use TYPO3 hooks to customise what is displayed in a given listing.
# 1. Make an empty extension
# 2. ext_tables.php
<?php
require_once t3lib_extMgm::extPath('dblist_hook') . '/class.user_tx_belisthook.php';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['getTable'][] = 'user_tx_belisthook';
?>