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 'nokogiri' | |
require 'open-uri' | |
r = open('http://en.wikipedia.org/wiki/List_of_The_Price_Is_Right_pricing_games').read | |
doc = Nokogiri::HTML(r) | |
name = doc.css('span.mw-headline').map(&:text).select{|name| name.size > 1}.sample |
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
# project_name/spiders/foo_spider.py | |
from scrapy.contrib.spiders import CrawlSpider | |
class FooSpider(CrawlSpider): | |
post_process = dict( | |
klass = "Foo::Worker", | |
# queue = "default", | |
# retry = True, | |
) |
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
# This is an example of the Stack Exchange Tier 1 HAProxy config | |
# The only things that have been changed from what we are running are: | |
# 1. User names have been removed | |
# 2. All Passwords have been remove | |
# 3. IPs have been changed to use the example/documentation ranges | |
# 4. Rate limit numbers have been changed to randome numbers, don't read into them | |
userlist stats-auth | |
group admin users $admin_user | |
user $admin_user insecure-password $some_password |
How annoying is it that Rails doesn't do what you tell it, but tries to be smart? Trying to use custom DB logic in a Rails migration:
create_table :foos do |t|
t.timestamp :inserted_time, null: false, default: 'now()'
end
Results in this:
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
### Keybase proof | |
I hereby claim: | |
* I am abevoelker on github. | |
* I am abevoelker (https://keybase.io/abevoelker) on keybase. | |
* I have a public key whose fingerprint is 7C75 A5F5 E608 E133 4314 7A24 65A8 0811 BC6A 8D92 | |
To claim this, I am signing this object: |
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
scala> val scores = Map("a" -> 100, "b" -> 101) | |
scores: scala.collection.immutable.Map[String,Int] = Map(a -> 100, b -> 101) | |
scala> scores.filter { case (_, i) => i > 100 } | |
java.lang.AssertionError: assertion failed: List(value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp, value _2$mcI$sp) | |
at scala.reflect.internal.Symbols$Symbol.suchThat(Symbols.scala:1916) | |
at scala.tools.nsc.transform.SpecializeTypes$$anon$2.matchingSymbolInPrefix$1(SpecializeTypes.scala:1460) | |
at scala.t |
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
data Tree = Empty | |
| Leaf Int | |
| Node Tree Tree |
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
<?php | |
/* Original code written by Abe Voelker, copyright 2008 */ | |
/* Last updated: 12/07/08 3:45am CST - added IP Ban workaround - set $ALTERNATE_INTERFACE to an alternate IP/hostname/adapter (but only if your server has access to it!); also cleaned up some of the code */ | |
/* NOTE - If you can't seem to get logged in to eBay, remove any special characters from your password OR userid such as )(*&^%$#@!./,";?><}{][ */ | |
/* This code is released for educational purposes only, as a proof of concept. Please do not execute it against any eBay | |
server as it probably violates eBay's ToS. In addition, some of the code I have used are snippets from other sources; I |
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/perl | |
#------------------------------------------------------------------------------- | |
# File: getRcodeParams.pl | |
# Purpose: Decodes the main block parameters of compiled OpenEdge ABL r-code. | |
# Arguments: [0] File system location of an r-code file to parse | |
# Returns: List of parameters (newline-separated) from the main execution | |
# block. The parameters are in the form: | |
# [input/output type] [variable name] [datatype] | |
# Author(s): Abe Voelker | |
# Created: 2010-09-14 |
OlderNewer