en en en en id en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en sk es en en en en en en en en fr en en en en en en en en en en en en en en en en en en fa en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en pt en en en en en en en en en en en en en en
As I stumble through the world of linux, I've decided to log new tricks I learn because I often forget. I decided to share the log because…. eh, why not.
Formatting Numerical Input with Rails
Kubuntu 16.04 GUI Audio Controls not working
Polymorphic Associations The Smart Way: Using Global Ids
Get Firefox to display warning message when exiting multiple tabs
jaehoo on Kubuntu 16.04 GUI Audio Contro…
BennyBeat on How to download a file from so…
fastrapidleech.com on How to download a file from so…
neanderslob on How to download a file from so…
Kubuntu 16.04 GUI Audio Controls not working
April 21, 2016April 22, 2016 neanderslobaudio, controller, kde, kmix, kubuntu, pulseaudio, settings, sound, ubuntu, volume2 Comments
I just upgraded to Kubuntu 16.04 beta and ran into a frustrating situation. My audio controls weren’t working; I tried my volume buttons, mute button and the little icon at the bottom (which happened to be highlighted in red).
When I went into Audio Volume Settings, all tabs had their own little version of “No _____ Detected”
So what to do?
After some troubleshooting with the fantastic help of “clivejo” in the #kubuntu freenode channel, it was finally determined that the settings that I carried over from my previous version of Kubuntu were causing the problem.  Here’s how I solved it:
Do this for all user accounts that have been carried over (these configurations are user-specific)
If the issue persists, reinstall pulseaudio: sudo apt-get install --reinstall pulseaudio
With these four steps, you should regain control over your life again (or at least your audio).
You may find that the above temporarily solves the problem but upon the next bootup, it’s the same issue all over again.  (That was the case with me.)  Apparently there was another file somewhere in ~/.config/ left over from 14.04 that was screwing everything up.  (Seemed it clashed with Plasma’s autologin and pulse audio got pinched in the middle.)  Anyway, I just removed ~/.config/ entirely and started fresh.  If that’s not an option for you, remove each file one by one and see which one’s the culprit.  I just didn’t have the patience for that.
The files that were causing trouble in my ~/.config/ were:
Kubuntu 16.04 GUI Audio Controls not working
January 22, 2015January 22, 2015 neanderslobcheat sheet, cheatsheet, controller, current_user, edit, index, new, posts, rails, ruby on railsLeave a comment
Common in index method
Get all posts and save them to @post, ordered by when they were creating in descending order:
@post = Post.all.order("created_at DESC")
Get all posts by a particular user and save them to @post, ordered by when they were creating in descending order:
@post = current_user.posts("created_at DESC")
Common in new method
Create a new post for the current user when that user has_many posts:
Create a new post for the current user when that user only has_one post:
To authorize which users can access what
See my post here.
How to Override and Customize the Devise Controller in Rails
December 10, 2014December 10, 2014 neanderslobauthentication, controller, devise, mvc, rails, web-developmentLeave a comment
Was an absolute lifesaver when I was trying to add additional registration information to my sign-up page.
How I Learned Ruby on Rails
Judging by the number of different StackOverflow questions, there are a lot of people trying to do this, and a lot of confusion. Here is how I did it, and hopefully it helps you.
I have a User and a Verifier model.  What I want to do is create a new Verifier every time I create a new user, and pass in the user.id for the User into the verifier.user_id so that they are mapped together.
In order to do this I want to not really override but add additional functionality to the existing devise controller that handles when new users are created (and destroyed).  So I need to access the RegistrationsController#Create function in devise.
First thing is to create a new folder in the ‘app/controllers‘ folder where we can put my custom controller.  I called mine ‘app/controllers/my_devise‘.  Then create a new file in this folder…
View original post 534 more words
How to Override and Customize the Devise Controller in Rails
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.