How do I customize the banner/header image of Hyrax/Samvera? - ruby-on-rails

I'm a web developer, trying to get my bearings with the Samvera-based application known as Hyrax. I'm using version 2.1.0.rc3. I have done some devops-type stuff with Hyrax so far, I have an app running on AWS and can deploy new code to that stack via Capistrano... but I'm tired of looking at the default header image... time to move in... however, I'm stuck. I've tried searching for terms like image-masthead in the application code, but so far, no luck. I have a suspicion this is a frequently asked question, so I'd accept as an answer just a link to a howto. But... in my searching for an answer I have not yet found such a document. So, I'm turning to Stack Overflow. Help?

In your local application, search the config/initializers/hyrax.rb file for the string config.banner_image and try uncommenting it (and altering the URL to a custom image) and restart your rails server.

Related

Electron Remote Upgrade Issue

I have a working Electron app which I wrote about two years ago. I'm not an employee of a company, but just some guy that wrote an app that a few people use to make the world a better place. Anyway, I need to make some changes to the app but my computer crashed a while back so I downloaded my old code from Github onto my new computer and started to get to work. But immediately I found the app wouldn't work in the new 17.0.0 version of electron because the REMOTE module in Electron was deprecated and then removed in previous versions. I tried to follow the instructions here... https://www.npmjs.com/package/#electron/remote?activeTab=readme to replace REMOTE with the new #electron/remote module. I've had several problems, my most recent is:
JavaScript Error: Uncaught Exception: TypeError BrowserWindow is not a constuctor at app.createWindows (C:...\main.js:89:17).
I use the remote functionality (properties?) over 50 times in my app, including .dialogue, .getGlobal, .getCurrentWindow, and .BrowserWindow.getAllWindows
I'm not including my code here because I'm not really looking for a a coding solution (unless that's the easy/best/only thing I should do and you can give me a solution from the information I've written) but more general advice on what direction I should go to solve this problem. I'm a good programmer in a language that is not Electron, or JavaScript, or NodeJS! So, with the right instruction I can get by, but please be easy on me. (For example I get lost in the instructions for #electron/remote around the API Reference section.) Thanks for any help you can provide.
Mike
Some big changes have been made to Electron over the past couple of years, especially with the use of remote. I would hate to say it but it looks like you are in for a bit of work to get it operational again.
You will want to look at ipcMain, ipcRender and contextBridge.
The inclusion of webPreferences: {preload: ""} in your new BrowserWindow() method plus the use of the above Electron methods will place you in a good starting position for safe, quick, thread seperated code.
See Context Isolation and Inter-Process Communication for more info.
PS: If you need a quick bit of code to get you going / give you an idea then let me know.

Changing Bitnami Open edX Logo

I'm new to Bitnami and Open edX and I'm having trouble changing the logo. I'm new at this and was experimenting with adopting the red-theme that comes with it and changing preexisting values for styling (which I did successfully). However, I am unable to change the logo without the site crashing and giving a 500 error after about a minute or so.
This happened when I replaced ~/apps/edx/var/staticfiles/red-theme/images/logo.3364725269f9.png with my own, with the same filename. It's odd, because it works for about a minute or two and looks perfect. But, when I refresh about 3 minutes later, the site doesn't load. I also tried replacing the logos in ~/apps/edx/var/staticfiles/images as well as ~/apps/edx/edx-platform/themes/red-theme/lms/static/images, but nothing has worked.
Lastly, I've tried following the directions here:
https://stackoverflow.com/questions/32900783/open-edx-update-logo
https://community.bitnami.com/t/trying-to-add-organization-logo/41865
https://community.bitnami.com/t/changing-the-open-edx-organization-logo/50790
but to no avail. Each time I change it, I have been recompiling the assets, just to make sure.
Also, this is my first stackoverflow post ever, so please let me know ways I could improve my questions; I'd really appreciate it! Thanks!
Bitnami developer here,
If you access your /opt/bitnami/apache2/logs/error_log file you should see an error like:
The name 'red-theme/images/logo.png' could not be hashed with ...
I was able to make it work by substituting both /opt/bitnami/apps/edx/var/staticfiles/red-theme/images/logo.3364725269f9.png and /opt/bitnami/apps/edx/var/staticfiles/red-theme/images/logo.png, and then update LMS assets by running:
sudo /opt/bitnami/apps/edx/bin/edxapp-update-assets-lms
I hope it helps

How to get Swagger UI to work based on documentation guide? (even the example)

I am trying to use Swagger UI to document our node.js API, so I went to http://swagger.io/docs/, down to Swagger UI Documentation -> Usage, to find this
Now, this is not the only place that provides these instructions, there are dozens of blogs & tutorials saying the same thing, so that's exactly what I did.
Cloned the repo, went into /dist/ and ran the /dist/index.html and all I get is an empty page with an error:
I'm slowly going crazy now as I can't find anything about it and literally every place I looked just has the same, copied, instructions with nothing else provided (like what could go wrong? you just open a file...)
Any help or explanations are much appreciated!
P.S. for some reason opening the /public/index.html works (mentioned nowhere on the www)
I think this is bug in new version of swagger-UI. This is fresh release and they are still modifying and fixing bugs.
Look here: Swagger-ui cannot access JS scripts. This seems to be similar problem, maybe it will help you.

django admin not showing project

Hi I'm sure i am doing something dumb! Fairly new to django and pycharm. I am learning by writing two projects: the tango with django one and another to test ideas and learning (about old girlfriends!).
I am working on the rango project. I've scheme-migrated, syncdb, migrate, debugged and no errors. But when i run server, the admin page shows the other project only. I have not worked on it today.
As far as I can tell I have all the right code including registering the models and admin.autodiscover plus i have cleared the cache.
SO the question is: which projects does it show on the admin page - all? How does it know?
Final odd point the windows circle on the site admin tab is still going round as though its looking for something else.
Many thanks for help. I haven't pasted any code as not sure what would be helpful.
I eventually realized that the admin server was still running. As laptops don't have a ctrl break key (and i couldn't find my Samsung mapping) i killed the server using task manager and all was fine.

Web Part Deployment in SharePoint

I've built a web part and after several deployments to a specific site, SharePoint suddenly won't give the option to deploy to a specifi site, a message is immediatelly displayed that the solution is deplyed globally.
I don't know what I did to cause this. I've been useing stsadmn -o addsolution method, except once when when I tried to just run the Setup.exe file.
Anyone has any idea why is it happenning and how to correct this.
Thanks,
EJM
First make sure to retract the solution (with stsadm), if it doesn't work, use -force/-override, and then delete with the same.
Than try to do it again, and it should work.

Resources