Skip to content

Instantly share code, notes, and snippets.

@kallam
kallam / bugle-rss.xml
Last active October 13, 2022 03:13
Modified version of the original Bugle RSS feed with broken links replaced with episodes hosted on http://gamesplusone.com/thebugle/
<?xml version="1.0"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>
<title>The Bugle - Audio Newspaper For A Visual World</title>
<description> John Oliver and Andy Zaltzman, fully-qualified Grand Masters of Satirical Jabber, bridge the watery rift through the healing medium of topical podcastery.</description>
<itunes:subtitle> John Oliver and Andy Zaltzman, fully-qualified Grand Masters of Satirical Jabber, bridge the watery rift through the healing medium of topical podcastery.</itunes:subtitle>
<itunes:category text=""/>
<itunes:author>Times Online</itunes:author>
<itunes:image href="http://extras.thetimes.co.uk/public/podcastimages/700X700_thebugle.jpg"/>
<itunes:owner>
@rex
rex / bootstrap-navbar.slim
Created August 8, 2014 12:56
Default Twitter Bootstrap nav bar, in the Slim templating language
nav.navbar.navbar-default role="navigation"
.container-fluid
/! Brand and toggle get grouped for better mobile display
.navbar-header
button.navbar-toggle data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" type="button"
span.sr-only Toggle navigation
span.icon-bar
span.icon-bar
span.icon-bar
a.navbar-brand href="#" Brand
@JohnEstropia
JohnEstropia / JEProgressView.h
Last active October 5, 2023 14:59
Workaround an annoying bug with iOS 7.1 where custom track and progress images for UIProgressView gets ignored
//
// JEProgressView.h
//
//
// Created by John Rommel Estropia on 2014/03/11.
// Copyright (c) 2014 John Rommel Estropia.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
@ceme
ceme / bash_curl_loop
Last active January 19, 2023 13:07
bash curl loop
while true; do sleep 1; curl http://www.google.com; echo -e '\n\n\n\n'$(date);done
@scoop
scoop / amazon-suggest-germany.php
Created April 6, 2013 07:59
Modified example Gist for Alfred 2 to use Amazon Suggest for Amazon.de (instead of the default Amazon.com). Note: Remove `<?php .. ?>`, which I only added for syntax highlighting purposes.
<?php
require('workflows.php');
$w = new Workflows();
// Grab input and build query url string
$in = "{query}";
$url = "http://completion.amazon.co.uk/search/complete?method=completion&q=".urlencode( $in )."&search-alias=aps&mkt=4&x=updateISSCompletion&noCacheIE=1295031912518";
// Grab the data from Amazon
$str = $w->request( $url );
@mattscilipoti
mattscilipoti / postgres.rake
Last active May 1, 2019 18:42
rake db:kill_postgres_connections
puts "WARN: We are patching rake tasks to support postgres. You have upgraded Rails and may not need this patch any more (lib/tasks/postgres.rake)." if Rails.version > "3.2.8"
namespace :db do
desc 'kills connections to postgres db'
task :kill_postgres_connections => :environment do
env = ENV['RAILS_ENV']
db_config = Rails.configuration.database_configuration[env]
fail(ArgumentError, "Could not find db config entry for env (#{env})") unless db_config
db_name = db_config['database']
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@Jaybles
Jaybles / UIDeviceHardware.h
Created October 28, 2011 19:33
UIDeviceHardware - Determine iOS device being used
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;