This file contains hidden or 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 on_success!(response, ax_response) | |
debugger | |
email=ax_response.data["http://schema.openid.net/contact/email"] | |
if user = find_user_by_email(email) | |
user | |
else | |
user=user_class.new({:email=>email}) | |
user.save | |
user | |
end |
This file contains hidden or 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 run! | |
if request.params[:'openid.mode'] | |
response = consumer.complete(request.send(:query_params), "#{request.protocol}://#{request.host}" + request.path) | |
case response.status.to_s | |
when 'success' | |
ax_response = ::OpenID::AX::FetchResponse.from_success_response(response) #modified | |
result = on_success!(response, ax_response) | |
Merb.logger.info "\n\n#{result.inspect}\n\n" | |
result | |
when 'failure' |
This file contains hidden or 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
# yeban theme for SLiM | |
# by Anurag Priyam | |
# Messages (ie: shutdown) | |
msg_color #FFFFFF | |
msg_font Monaco:size=18:bold:dpi=75 | |
msg_x 50% | |
msg_y 40% | |
msg_shadow_color #702342 | |
msg_shadow_xoffset 1 |
This file contains hidden or 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
IplImage* dilate( const IplImage* src, const IplImage* kernel){ | |
//create a destination image with the same parametrs as the source image | |
IplImage* dst = cvCreateImage(cvSize(src->height, src->width), IPL_DEPTH_8U, 1); | |
vector<uchar> pix_values; //to store all the pixels that are covered | |
int i, j; | |
//loop over each row | |
for( int row = 0; row < src->height; row++ ){ |
This file contains hidden or 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
-- | |
-- xmonad example config file. | |
-- | |
-- A template showing all available configuration hooks, | |
-- and how to override the defaults in your own xmonad.hs conf file. | |
-- | |
-- Normally, you'd only override those defaults you care about. | |
-- | |
import XMonad |
This file contains hidden or 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
15a16,21 | |
> import XMonad.Hooks.ManageDocks | |
> import XMonad.Hooks.EwmhDesktops | |
> | |
> import XMonad.Layout.Maximize | |
> | |
> | |
19c25 | |
< myTerminal = "xterm" | |
--- |
This file contains hidden or 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
//the return pointer must be freed | |
char* readline() { | |
char buffer; | |
char *command = NULL; | |
char *tmp = NULL; | |
int size = 0; | |
int last = 0; | |
while ( 1 ){ //listen indefinitely for characters |
This file contains hidden or 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
/* | |
* ===================================================================================== | |
* | |
* Filename: threads.c | |
* | |
* Description: Familiarising with pthreads. | |
* | |
* Version: 1.0 | |
* Created: Thursday 11 March 2010 01:25:12 IST | |
* Revision: none |
This file contains hidden or 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
=begin | |
Tested with ruby 1.8.7 on a Debian machine, with my own gmail account. | |
ruby -rubygems "from name" "from email" "to name" "to email" "subject" "body" | |
=end | |
require 'net/smtp' | |
require 'tlsmail' | |
Net::SMTP.enable_tls OpenSSL::SSL::VERIFY_NONE | |
$SERVER = 'smtp.gmail.com' |
This file contains hidden or 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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="font" > | |
<edit mode="assign" name="autohint" > | |
<bool>true</bool> | |
</edit> | |
</match> | |
<match target="font" > | |
<edit mode="assign" name="rgba" > |
OlderNewer