Skip to content

Instantly share code, notes, and snippets.

View jtomasek's full-sized avatar

Jiri Tomasek jtomasek

  • SUSE
  • Usti nad Orlici, Czech Republic
View GitHub Profile
pdf_head_html = "<head>"
pdf_head_html << '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'
pdf_head_html << "<%= javascript_include_tag 'jquery/jquery-1.8.3.min' %>"
pdf_head_html << "<%= javascript_include_tag 'wkhtmltopdf.tablesplit' %>"
# pdf_head_html << "<%= stylesheet_include_tag 'print' %>"
# pdf_head_html << '<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>'
# pdf_head_html << '<script type="text/javascript" src="/javascripts/wkhtmltopdf.tablesplit.js"></script>'
pdf_head_html << "</head>"
fedora18vm: ~/alchemy-tables [git:master]
→ grunt test
Running "test" task
Running "clean:server" (clean) task
Cleaning ".tmp"...OK
Running "compass:dist" (compass) task
WARNING: 'logo.png' was not found (or cannot be read) in /home/jtomasek/alchemy-tables/app/images/embed
WARNING: 'spinner_head.gif' was not found (or cannot be read) in /home/jtomasek/alchemy-tables/app/images/alchemy/icons
<jtomasek> ping, ehelms, hi, mhulan had a problem regarding asset precompilation during rpm build here is the conversation: https://gist.github.com/jtomasek/5255206
<ehelms> jtomasek: hrmm, I never got that anytime I tried to asset precompile, I'd have to see, I think, what his asset precompile path is
<ehelms> jtomasek: did he leave for the day already?
<jtomasek> ehelms: yes it seems so unfortunatelly
<jtomasek> obviously the error is caused by Makefile not having a extension. but it is strange that it only happens in rpmbuild and not when he runs it on localhost. The issue might be fedora gem (sprockets) used when rpm is bult maybe?
<ehelms> hrmm, could be, I haven't tried to build an RPM with asset pipeline yet I don't think, but if it's trying to compile the Makefile
<ehelms> that tels me his pathing is pointing at the engine's directories somehow
<ehelms> instead of just the main app's manifests
<ehelms> which should grab the specific JS files
<ehelms> that's my inclination at least
<mhulan> hi, anyone experienced "Asset logical path has no extension: alchemy/jquery/plugins/flot-0.7/Makefile" when running rake assets:precompile? any idea what may be wrong?
<jtomasek> it seems like asset can't be file without extension, is removing Makefile valid solution for you? By googling I found some filed issues in sprockets, not sure if it has been resolved
<jtomasek> mhulan: ^
<mhulan> jtomasek: thx, just found similar comments via google, I use alchemy as 3rd party gem and got this when running precompilation during rpm build, I'll try newer version of sprockets first
<jcoufal> mhulan: hey, just wondering in what project are you using alchemy?
<mhulan> currently something called Signo (SSO for Katello and Foreman)
<jcoufal> mhulan: is that some new RH project?
<mhulan> jcoufal: no no, it's just one small support application for Katello
<jcoufal> mhulan: ah, alright, cool, if you need anything, we will do our best to help you
<mhulan> well I just updated sprockets to 2.9.0 and still same problem,
@jtomasek
jtomasek / gist:5189239
Created March 18, 2013 17:49
Javascript translations
Javascript translations:
base requirement:
- have no hardcoded strings in javascript
general aproach:
- have strings defined in view file (html/erb/haml...) in data attribute, this enables their translation
- access these translated strings from javascript
angular directive approach:
- we need to translate strings used in directive templates
drwxrwxr-x. 2 jtomasek jtomasek 4096 Feb 22 09:23 ActionScript
drwxrwxr-x. 3 jtomasek jtomasek 4096 Feb 23 12:44 Alignment
drwxrwxr-x. 2 jtomasek jtomasek 4096 Feb 22 09:23 AppleScript
drwxrwxr-x. 2 jtomasek jtomasek 4096 Feb 22 09:23 ASP
drwxrwxr-x. 2 jtomasek jtomasek 4096 Feb 22 09:23 Batch File
drwxrwxr-x. 2 jtomasek jtomasek 4096 Feb 22 09:23 C#
drwxrwxr-x. 2 jtomasek jtomasek 4096 Feb 22 09:23 C++
drwxrwxr-x. 2 jtomasek jtomasek 4096 Feb 22 09:23 Clojure
drwxrwxr-x. 2 jtomasek jtomasek 4096 Feb 23 11:17 Color Scheme - Default
drwxrwxr-x. 2 jtomasek jtomasek 4096 Feb 22 09:23 CSS
// winged_monkey_services.js
var wingedMonkeyServices = angular.module('wingedMonkeyServices', ['ngResource']);
wingedMonkeyServices.factory("ProviderApplication", function($resource){
return $resource('provider_applications/:id/:action', {id: "@id"}, {
pause:{ method:'POST', params:{ action:'pause'} }
});
});
fedora17: ~/converge-ui-example +[git:master]
→ l
total 96
drwxrwxr-x. 18 jtomasek jtomasek 4096 Dec 10 11:21 .
drwx------. 40 jtomasek jtomasek 4096 Dec 10 11:26 ..
drwxrwxr-x. 7 jtomasek jtomasek 4096 Nov 16 16:07 app
drwxrwxr-x. 3 jtomasek jtomasek 4096 Sep 17 13:49 bundle
drwxrwxr-x. 2 jtomasek jtomasek 4096 Sep 17 13:49 .bundle
drwxrwxr-x. 5 jtomasek jtomasek 4096 Nov 16 16:07 config
-rw-rw-r--. 1 jtomasek jtomasek 165 Oct 23 12:24 config.ru
@jtomasek
jtomasek / gist:4249448
Created December 10, 2012 08:59
settings.yml
:default_deltacloud_url: http://localhost:3002/api
:auth:
# supported strategies: database, ldap
:strategy: database
:groups:
# allows locally-managed groups
:enable_local: true
# allows ldap-managed groups
:enable_ldap: true
@jtomasek
jtomasek / gist:4224686
Created December 6, 2012 14:06
make rpms
→ make rpms
sed -e "s|@VERSION@|0.13.0|;s|^\(Release:[^%]*\)|\1".20121206141330gitb0d3087"|" aeolus-conductor.spec.in > aeolus-conductor.spec
mkdir -p dist/aeolus-conductor-0.13.0
cp -a aeolus-conductor.spec AUTHORS conf COPYING Makefile src \
dist/aeolus-conductor-0.13.0
# find dist/aeolus-conductor-0.13.0/src/vendor/converge-ui/ -mindepth 1 -maxdepth 1 | xargs rm -rf
tar -C dist -zcvf aeolus-conductor-0.13.0.tar.gz aeolus-conductor-0.13.0
aeolus-conductor-0.13.0/
aeolus-conductor-0.13.0/AUTHORS
aeolus-conductor-0.13.0/src/