Skip to content

Instantly share code, notes, and snippets.

Avatar
🦄

Gareth Jones symm

🦄
View GitHub Profile
View debian high res console
--- grub 2010-05-25 17:30:29.000000000 +0100
+++ /etc/default/grub 2010-06-01 19:20:59.000000000 +0100
@@ -3,11 +3,12 @@
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
-GRUB_HIDDEN_TIMEOUT_QUIET=true
+#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
@symm
symm / gist:3260113
Created Aug 4, 2012
PHP url validation bug
View gist:3260113
<?php
/*
* FILTER_VALIDATE_URL Validates value as URL (according to » http://www.faqs.org/rfcs/rfc2396)
* http://php.net/manual/en/filter.filters.validate.php
*/
$check = filter_var('http://google.com/', FILTER_VALIDATE_URL);
var_dump($check);
// $check = string(18) "http://google.com/"
@symm
symm / composer.json
Created Nov 8, 2012
Returns the episode titles a certain American Podcast series
View composer.json
{
"require":
{
"symfony/dom-crawler": "2.2.x-dev",
"symfony/css-selector": "2.2.x-dev"
}
}
@symm
symm / deploy.rb
Last active Oct 12, 2015
Capifony config for Symfony 2.1 Project Deployment
View deploy.rb
set :application, "symfony"
set :domain, "#{application}.yourdomain.com"
set :deploy_to, "/www/#{domain}"
set :app_path, "app"
set :user, "yourusername"
set :repository, "file:///local/path/to/project/repo"
set :scm, :git
set :deploy_via, :copy
@symm
symm / symfony.conf
Last active Oct 12, 2015
Nginx Symfony 2.1 vhost config
View symfony.conf
server {
listen 80;
server_name yourdomain.com;
root /www/yourdomain.com/current/web;
error_log /var/log/nginx/yourdomain.error.log;
access_log /var/log/nginx/yourdomain.access.log;
# strip app.php/ prefix if it is present
@symm
symm / gromlist.diff
Created Nov 12, 2012
Hack in Zip file support to gromlist (http://mundogeek.net/gromlist/)
View gromlist.diff
--- /usr/lib/gromlist/gromlist.py 2012-11-12 11:36:55.697698407 +0000
+++ gromlist.py 2012-11-12 11:41:32.703071996 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#:!/usr/bin/env python
# -*- coding: UTF-8 -*-
###
#
@@ -1047,8 +1047,21 @@
# Calculate the CRC of the files in the rom folder
@symm
symm / kernel-checker.php
Created Nov 12, 2012
Linode Kernel version alerting.
View kernel-checker.php
<?php
/*
* Linode Kernel Version alerter.
*
* Fetches a list of the available Linode kernels and alerts you if
* your currently running version is out of date.
*
* Crontab: * 23 * * php /path/to/this/script
* @author Gareth Jones
*/
@symm
symm / Rakefile
Created Nov 16, 2012
Pingomatic task for Octopress blogging
View Rakefile
desc 'Ping pingomatic'
task :pingomatic do
begin
require 'xmlrpc/client'
cfg = YAML.load_file("_config.yml")
puts '* Pinging ping-o-matic'
XMLRPC::Client.new('rpc.pingomatic.com', '/').call('weblogUpdates.extendedPing', "#{cfg['title']}" , "#{cfg['url']}", "#{cfg['subscribe_rss']}")
rescue LoadError
puts '! Could not ping ping-o-matic, because XMLRPC::Client could not be found.'
end
@symm
symm / steam-lucasarts-support.diff
Created Nov 18, 2012
Steam LucasArts Adventures patch (from http://scummvm.bencastricum.nl/) ported to ScummVM v1.5.0
View steam-lucasarts-support.diff
diff --git a/audio/audiostream.cpp b/audio/audiostream.cpp
index 1c5c435..32b38ef 100644
--- a/audio/audiostream.cpp
+++ b/audio/audiostream.cpp
@@ -33,6 +33,7 @@
#include "audio/decoders/quicktime.h"
#include "audio/decoders/raw.h"
#include "audio/decoders/vorbis.h"
+#include "audio/decoders/cdda.h"
@symm
symm / gist:5987565
Created Jul 12, 2013
Quick and dirty script for reading Skype conversions from db file
View gist:5987565
<?php
class SkypeLogs {
private $db;
public function __construct()
{
// Create (connect to) SQLite database in file