Skip to content

Instantly share code, notes, and snippets.

@ngrichyj4
ngrichyj4 / install.sh
Last active October 6, 2017 18:33 — forked from ultimagriever/install.sh
Start PhantomJS server as a Linux service
export TMPDIR=/tmp/
cd /usr/local/lib
mkdir phantom
cd phantom
wget https://gist.githubusercontent.com/ultimagriever/72fcb3e4446460638d65aecd2fbee98c/raw/9d915c60921219900b60c64cf5379c54d63ca43c/restart.sh
wget https://gist.githubusercontent.com/ultimagriever/72fcb3e4446460638d65aecd2fbee98c/raw/9d915c60921219900b60c64cf5379c54d63ca43c/start.sh
wget https://gist.githubusercontent.com/ultimagriever/72fcb3e4446460638d65aecd2fbee98c/raw/9d915c60921219900b60c64cf5379c54d63ca43c/status.sh
wget https://gist.githubusercontent.com/ultimagriever/72fcb3e4446460638d65aecd2fbee98c/raw/9d915c60921219900b60c64cf5379c54d63ca43c/stop.sh
chmod +x *.sh
ln -s /usr/local/lib/phantom/restart.sh /usr/local/bin/phantom-restart
@ngrichyj4
ngrichyj4 / _spec.json
Last active December 18, 2015 22:38
Robot challenge.
{
"pint": {
"url": "https://pint.com/",
"params": {
"pname": "name",
"pdesc": "description"
}
},
"parse": {
"parsename": "name",
Permission denied - /Users/[user]/Sites/RubyMotion/Cardup/vendor/Pods/BuildHeaders/SVProgressHUD/SVProgressHUD.h
/Users/[user]/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/fileutils.rb:1314:in `unlink'
/Users/[user]/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/fileutils.rb:1314:in `block in remove_file'
/Users/[user]/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/fileutils.rb:1319:in `platform_support'
/Users/[user]/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/fileutils.rb:1313:in `remove_file'
/Users/[user]/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/fileutils.rb:1302:in `remove'
/Users/[user]/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/fileutils.rb:766:in `block in remove_entry'
/Users/[user]/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/fileutils.rb:1352:in `block (2 levels) in postorder_traverse'
/Users/[user]/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/fileutils.rb:1352:in `block (2 levels) in postorder_traverse'
/Users/[user]/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/fileutils.rb:1356:in `postorder_traverse'
@ngrichyj4
ngrichyj4 / gist:4325895
Created December 18, 2012 07:43
Disqus Code
/* Place the following code where you'd like Disqus to load: */
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'planhero'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
@ngrichyj4
ngrichyj4 / comment_summaries.rb
Last active October 11, 2015 23:28
Fetch TechCrunch Comments
class CommentSummaries
#extend HerokuAutoScaler::AutoScaling
@queue = :comment_summaries
def self.perform()
feed = Feedzirra::Feed.fetch_and_parse("http://feeds.feedburner.com/TechCrunch/")
feed = Feedzirra::Feed.update(feed)
entry = feed.entries
#objComments = Array.new #=> contains single page post
objPost = Array.new #=> contains all page posts indexed with (i)