Can someone explain this to me? In particular the difference between:
http://github.com/whymirror/greg and http://piumarta.com/software/peg/
The former being a re-entrant version of the later.
What are some best practices to keep in mind when developing a script program that could be integrated with a GUI, probably by somebody else, in the future?
Possible scenario:
i develop a fancy python CLI program that scrapes every unicorn images from the web
i decide to publish it on github
a unicorn fan programmer decides to take the sources and build a GUI on them.
he\she gives up because my code is not reusable
How do i avoid step four and let unicorn fan programmer build his\her GUI without hassle?
Is there a way from JRuby to introspect on a Java object and find out its Java-land methods? Like what http://github.com/oggy/looksee provides, but for Java. Or like
(someobject).methods - 1.methods
This would be nice for just taking a look at what a Java object provides versus the APIDoc for it.
I am using the plugin:
http://github.com/karmi/is_taggable
How can I perform simple statistics on my tags, e.g. what's the most used tag? which tags are not used, etc.?
With SQL I would do something like:
select id, count(*) from taggings group by taggable_id;
But I am not seeing how to do this with the plugin.
Thanks!
What will be proper regular expression for git repositories?
example link:
[email protected]:someone/someproject.git
so it will be like
server can be url or ip
Project can contain some other characters than alphanumeric like '-'
I'm not sure what is the role of '/'
any suggestions?
I am trying to create a simple RSS parser using the two frameworks. However I am getting PHPerrors when trying to write to my cache directory:
set_cache_location(APPPATH.'cache/rss');
I am running windows 7 with XAMPP using the latest version of Simplepie from github
error:
A PHP Error was encountered
Severity: User Warning
Message: C:\xampp\htdocs\geekurls/system/application/cache/rss is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.
Filename: libraries/simplepie.php
Line Number: 1732
I've been following Ryan Bates' Railscasts tutorial on CarrierWave, which you can find here
Everything works fine, except for when I go to view my profile, it gives me this error:
undefined local variable or method `user'
I don't know why it is telling me this, as I am using Devise for my authentication, and that is the name of my model.
Below are some of the files which may be useful:
https://gist.github.com/amarh21/7439421
I am using Rails 4.0.1 and ruby 2.0.0
In the course of my work i need to develop an authorization engine ( i'm already authenticated and i check access of a user to an action ) in order to store all the authorization logic inside a same place and be able to reuse it and i have created the mini library.
http://github.com/eltados/canny
what do you think about it?
Is there any lightweight Authorization engine library i could have a look at?
I'm using prawn to generate pdfs, set up ala http://wiki.github.com/sandal/prawn/using-prawn-in-rails
I'd like to access my routes so I can generate links in my pdfs, but now I'm not in a template like I used to do with prawnto, so I don't have access to the named routes.
class MyPdf < Prawn::Document
def to_pdf
text root_path
end
end
How can I include my named routes?
I am using this plugin: http://wiki.github.com/augustl/live-validations/ to check if the form field entered is valid or not. How do i disable the live validation for keypress and instead make it only fire when the submit button is clicked?
I've looked all over the internet and can't seem to find what i'm looking for...
I'm just trying to find a site with some examples on how to use the OFFICIAL facebook android SDK http://github.com/facebook/facebook-android-sdk
To be specific i'd like to see some examples on notification use and simple photo upload. But i'll take anything to help get a feel for using the SDK.
If anyone knows of any examples please share thank you so much!
Please, have a look at: http://twitter.github.com/bootstrap/base-css.html
There are many examples like this one:
if you look closer to the block borders, you can see that the gray block is under the white one. Using the browser's developer tools you can see that both boxes have an inherited z-index: auto;
I can't reproduce this effect on my website (without using z-index).
So, my question is: Why is the gray block under the white one?
Is there a better way to write this Expando class? The way it is written does not work.
I'm using Ruby 1.8.7
starting code quoted from https://gist.github.com/300462/3fdf51800768f2c7089a53726384350c890bc7c3
class Expando
def method_missing(method_id, *arguments)
if match = method_id.id2name.match(/(\w*)(\s*)(=)(\s*)(\.*)/)
puts match[1].to_sym # think this was supposed to be commented
self.class.class_eval{ attr_accessor match[1].to_sym }
instance_variable_set("#{match[1]}", match[5])
else
super.method_missing(method_id, *arguments)
end
end
end
person = Expando.new
person.name = "Michael"
person.surname = "Erasmus"
person.age = 29
I'm using GitHub for code and Heroku for the deployment platform for my rails app.
I don't want to have sensitive data under Git. Such data include database file settings (database.yml) and some other files that have secret API keys.
When I deploy to heroku, how can I deal with files that are not under revision control.
When I use Capistrano, I can write some hook methods, but I don't know what to do with Heroku.
Hey All,
assuming I'm running a small shop (3 devs) and using a Windows 7 machine as a centralised Git and IIS server what is the easiest way to get CI up and running?
This must be locally hosted CI (no github, no remote servers).
I'm doing C# .Net development with Visual Studio 2008.
Any help on getting this running with the minimum of effort and the nicest possible UI would be extremely helpful.
Thanks!
In rails 3 you can use bleeding edge gems like: gem "devise", :git => "git://github.com/plataformatec/devise.git". How do you do that with config.gem in rails 2.3.x?
Hi, i am using the rails plugin auto_complete http://github.com/rails/auto_complete. I have followed the examples, and its all working well, but with one small problem.
After submitting an auto completed text field, and then hitting the back button, the text field does not retain the previously selected value.
Does anyone have a solution please?
thanks
I've been trying to get autocomplete to work, however, I am getting a weird javascript error in the firebug console...
I used the https://github.com/crowdint/rails3-jquery-autocomplete gem.
The error I am getting reads: $(e).autocomplete is not a function
Here are the scripts i am including in my html:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
<script src="/javascripts/autocomplete-rails.js?1294035084" type="text/javascript"></script>
Thanks
Hi everyone,
I am setting up a new web app that will on the client side feature a multi-memcached server environment for reliability and performance.
Would it be wise for us to utilize something like Flexihash to make it better to replicate the data between the memcache servers?
Reference: http://github.com/pda/flexihash
Thanks!
I wrote this code to subscribe to USB devices being plugged in and unplugged; the point is for IOKit to deliver notifications to my iAttached() and iDetached() functions when the corresponding events occur. However, I don't get notifications.
The code can be seen here: http://gist.github.com/402391
I didn't want to over-populate this page with it, as it is moderately long.
hi,
im totally new to rails. here my question:
i made an app with articles and comments and use devise for authentication
sadly im only able to post 1 hyperlink so this is the middle part of my post with the files at gist: https://gist.github.com/771366
the article_id is pre selected in the comments/_form - but the user_id isnt. i googled a lot, tried value = session[:user_id] and others, but nothing worked
would be great if someone could tell me how it works ^^
thx
When I tried to install the openid plugin, I do not get any confirmation msg about the installation.Even I specify some random .git plugin name, It does not give out any error.
Can someone please tell me what about to do to rectify the problem?
I used the following syntax
ruby script/plugin install git://github.com/rails/open_id_authentication.git
For development, I guess it is fine to use a plugin like https://github.com/stephenplusplus/grunt-wiredep
But for production I would like to use CDN where such exists. Does it exist a Grunt plugin that goes through the bower.json file and replaces this with a CDN-link from the most popular ones (and if a component is present in more than one CDN, then pick one based on rank-setting or random or something).
I attempted to download the php_mongo.dll from this link (http://github.com/mongodb/mongo-php-driver/downloads) and added the extension to php. However it doesn't work at all.
My PHP version is: 5.2.x
Windows: Windows 7 64 bit.
I have also try to use pecl install mongo but it returned some error like:
This DSP mongo.dsp doesn't not exist.
Could somebody help?