Skip to content

Instantly share code, notes, and snippets.

View FiXato's full-sized avatar

Filip H.F. "FiXato" Slagter FiXato

View GitHub Profile
@FiXato
FiXato / bash_prompt_with_git_and_rbenv.sh
Last active August 29, 2015 13:57 — forked from kyanny/gist:1668822
Updated original bash prompt with git and rbenv example with a check for the __git_ps1 function instead of existence of a git bash-completion file.
# rbenv
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
source ~/.rbenv/completions/rbenv.bash
# prompt with ruby version
# rbenv version | sed -e 's/ .*//'
__rbenv_ps1 ()
{
rbenv_ruby_version=`rbenv version | sed -e 's/ .*//'`
@FiXato
FiXato / en.yml
Last active August 29, 2015 13:59 — forked from henrik/en.yml
# config/locales/en.yml
en:
i18n:
language:
name: 'English'
@FiXato
FiXato / openttd.rake
Created June 18, 2009 13:59 — forked from Narnach/openttd.rake
OpenTTD Rakefile
# Rake tasks to install OpenTTD from their Subversion source.
# Note: this is used on a Macbook, so the configuration and installation are based on this.
def cmd(str)
puts str
system str
end
desc 'Configure sources for compilation'
task :configure do
cmd './configure --with-ccache --enable-strip --disable-universal --with-cocoa MAKEOPTS="-j5" CFLAGS="-pipe" CXXFLAGS="-pipe"'
@FiXato
FiXato / github_gem.rb
Created July 13, 2009 07:34 — forked from bmaland/github_gem.rb
github_gem for rails
# Works like :gem for rails, but sets source to github's gem repo.
# add to lib/github_gem.rb in your rails project.
module Rails
class Configuration
def github_gem(name, options = {})
options[:source] = 'http://gems.github.com'
options[:lib] = name.sub(/[^-]+-/, '') unless options.has_key?(:lib)
self.gem(name, options)
end
end
@FiXato
FiXato / githubify.rb
Created July 31, 2009 12:59 — forked from Narnach/githubify.rb
creates/overwrites a file named <username>-<gemspec_file> and updates the s.name in there have the same project name format.
#!/usr/bin/env ruby
# Usage: githubify <gemspec_file> [username]
# Requires: github.name to be set for the current git project or [username] to be specified
# Result: creates/overwrites a file named <username>-<gemspec_file> and updates the s.name in there have the same project name format.
#
# Author: Wes Oldenbeuving
# E-mail: narnach@gmail.com
# License: MIT-LICENSE
class String
@FiXato
FiXato / gist:232808
Created November 12, 2009 10:57 — forked from Jonnotie/gist:225016
# Install kicker on osx: sudo gem install kicker --source http://gemcutter.org\
#
# Place a `.kick' file with this code in the root of your project, which contains the file to watch.
# Then start running kicker from the project root: $ kicker
FILE_TO_WATCH = 'mockup-1.psd'
counter = nil
if File.exist?('output')
@FiXato
FiXato / nzbmatrix_watchlist_mail2rss.rb
Created November 3, 2010 20:09 — forked from anonymous/nzbmatrix_watchlist_mail2rss.rb
Simple IMAP parser script that looks for NZBMatrix Watchlist mails and converts them to an RSS feed and downloads the NZBs.
#!/usr/bin/env ruby
# Simple IMAP parser script that looks for NZBMatrix Watchlist mails and converts them to an RSS feed and downloads the NZBs.
# Created by request of third party.
#
# LICENSE:
# Copyright 2010 Filip H.F. 'FiXato' Slagter
# You may use this work without restrictions, as long as this notice is included.
# The work is provided "as is" without warranty of any kind, neither express nor implied.
require 'net/imap'
require 'rss/maker'
@FiXato
FiXato / checkconfig.rb
Created January 5, 2012 02:37 — forked from UnknownEntity634/checkconfig.rb
Anope <= 1.8.x Deploy Script Cross-Section
#!/usr/bin/env ruby
# encoding: UTF-8
#
# A simple script that parses the Anope IRC Services services.conf for zbot and mysql variables.
# By:
# - Unknown_Entity aka o_o
# - Filip H.F. "FiXato" Slagter
#
# Now also compatible with 1.8.5 which seems to run on one of the archaic servers ><
require 'yaml'
@FiXato
FiXato / wunderground.mrc
Created May 27, 2012 21:17 — forked from anonymous/gist:2815875
wunderground.mrc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;; weather underground for mIRC ;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;by eqrunner ;;v3.0;;
/*
-- COMMANDS --
!w or !weather [zipcode|city,state|city,country|airport] = will return weather current conditions.
!current [zipcode|city,state|city,country|airport] = will return current conditions.
!forecast [zipcode|city,state|city,country|airport] = will give detailed 3 day forecast (for us)
!forecast5 [zipcode|city,state|city,country|airport] = will send 5 day forecast to $nick that requested. (to prevent chan flooding)
@FiXato
FiXato / weebots.rb
Last active December 16, 2015 09:48 — forked from UnknownEntity634/weebots.rb
WeeChat script to parse BotServ Botlists to find out which bots are no longer in use.
#!/usr/bin/env ruby
# encoding: utf-8
#
# A WeeChat script to parse Anope's BotServ BOTLIST into a sorted list,
# so you can more easily find unassigned BotServ bots.
#
# Code by Unknown Entity (aka o_o aka Flaming Nutmeg) and Filip H.F. "FiXato" Slagter
# Based on the code by Unknown Entity
#
# Type /parsebotlist and go get some noms depending on bot list length while it collects info.