This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Ruby version of dspam-retrain perl script. | |
# Perl version: http://dspamwiki.expass.de/DspamRetrainScript | |
# Author: wsr@rushforthnetworks.com | |
# License: BSD | |
# Abstract: setup postfix to pipe mail into this script | |
# so that we may then pass it off to dspam in | |
# an appropriate way. | |
# | |
# dspam-retrain.rb handles spam-user@domain.tld, and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Continued from part 1: https://gist.github.com/2905683) | |
In this 2nd try, | |
I had monitored git folder while run these following commands: | |
C:\git\test> git status | |
C:\git\test> git branch b1 | |
C:\git\test> git checkout b1 | |
C:\git\test> git add readme.txt | |
C:\git\test> git commit -m "readme" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "json" | |
require "open-uri" | |
class Post | |
def self.location_label(latitude, longitude) | |
data = open("http://nominatim.openstreetmap.org/reverse?format=json&lat=#{latitude}&lon=#{longitude}&zoom=18&addressdetails=1").readlines.join("\n") | |
result = JSON.parse(data) | |
result_arr = [] | |
# london mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use URI; | |
use URI::URL; | |
use Web::Scraper; | |
use LWP::Simple; | |
my $pp = "http://pragprog.com/magazines"; | |
my $ok = "epub"; | |
my $mags = scraper { | |
process "span.link", "mags[]" => scraper { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
original_verbosity = $VERBOSE | |
$VERBOSE = nil | |
require 'rspec-puppet' | |
require 'rspec-hiera-puppet' | |
require 'test/unit' | |
require 'mocha/setup' | |
module Helpers | |
extend RSpec::SharedContext | |
def hiera_config_file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PonyOS | |
http://www.ponyos.org/ | |
Blizzard - Starcraft : Warhound is back | |
https://us.battle.net/sc2/en/blog/9369235 | |
Atlassian - JIRA Jr | |
http://www.atlassian.com/jirajr/ | |
Lambda The Ultimate - Migration to Facebook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def write_backtrace name, backtrace, filename | |
exceptions = Regexp.union([ | |
/\.bundle/, | |
/spec/, | |
/test/, | |
/lib\/ruby\/1.9.1/ | |
]) | |
backtrace.reject! { |line| line =~ exceptions } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Setup some variables needed for bootstrapping the environment | |
ROOT=/home/vrde/projectz/myproject | |
REPOS=${ROOT}/repos | |
export PYTHONPATH=${REPOS} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'codeclimate-test-reporter' | |
require 'simplecov' | |
require 'coveralls' | |
formatters = [SimpleCov::Formatter::HTMLFormatter] | |
formatters << Coveralls::SimpleCov::Formatter if ENV['COVERALLS_REPO_TOKEN'] | |
formatters << CodeClimate::TestReporter::Formatter if ENV['CODECLIMATE_REPO_TOKEN'] | |
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[*formatters] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
initializeANSI() | |
{ | |
esc="" | |
Bf="${esc}[30m"; rf="${esc}[31m"; gf="${esc}[32m" | |
yf="${esc}[33m" bf="${esc}[34m"; pf="${esc}[35m" | |
cf="${esc}[36m"; wf="${esc}[37m" | |
OlderNewer