What are the most useful gems to use in Rails?
RubyGems were developed to simplify and accelerate the stages of the application creation deployment and library connection. Utilizing this package manager for Ruby saves you time as you get ready-made solutions to almost any task instead of writing the functions from scratch. Each gem contains a particular element of functionality including all related files. Unfortunately they aren structured in any way so in order to find ruby gems it better to use a regular search engine and the required key words (check GitHub s ). Our dedicated development team also actively employs Ruby Gems in the process of software development. Here is the top of the most popular and useful ruby gems according to our experience GeoCoder s . Being able to connect through itself over 4 APIs this Ruby gem implements both the direct and reverse geocoding by IP address geographical coordinates and even real physical addresses (e.g. the address of the street). Bullet s . The most downloaded Ruby gems out there. It was initially created with an intention to boost software performance. It does so by decreasing the total amount of client-server requests. Basically Bullet tracks the N+1 cases of requests and notifies the developer when other tools can be used instead (e.g. cache counter). Pry s . We rmend to simplify the bug fixing procedures for your RoR-based application with the Pry gem which is a more advanced alternative to the standard IRB wrapper. ActiveModelSerializers s (which starts lagging while processingpound documents) and uses caching. Fast JSON API s . Fast JSON API wille in handy when you need fast serialization of software code. It works much faster than Wicked PDF s . This gem is working alongside with wkhtmltopdf s and helps realizing an interaction with the DSL generator. Devise Masquerade s . This Ruby gem helps developing multi user apps. In particular youll be able to test your app from the perspective of users with different levels of access. Devise s . Based on the MVC model the Devise gem can provide secure user authentication and session management. Letter opener s . If you need to create a newsletter mechanism to send notifications to all users that launched your app this gem will help you do that much easier you won need to integrate and configure your own SMTP server. Money Rails s . If you are planning to integrate your app with Ruby Money this gem wille in quite handy. Pundit s . A tool that allows defining different levels of access to the app functionality according to the rights of an authorized user.
What are some time-saving tips that every Linux user should know?
First I suggest using bash italic rather than any alternative such as tcsh fish italic or zsh italic . These are fine alternatives but bash italic is the default on the vast majority of Linux and other modern Unix systems and derivatives (including MacOS X and *BSD systems). Don't just learn it. Don't just use it. MASTER bash italic ! Also master vi italic (by which I mostly mean the vi italic patible subset of vim italic ). You're an emacs italic fan. Fine. You can live in emacs italic . But if you're going to spend a significant amount of time at any sort of Linuxmand prompt then it's likely that you're involved in administering or operating lots of Linux machines or virtual machine instances in a cluster. (It's primarily in the administrative and operational details where you care whether it's Linux vs. any other Unix-like OS). If you're bouncing around among a multitude of systems then having to stop and ensure that tools like emacs italic or zsh italic are installed will cost you lots of time. You can invest your time in customizing the systems (and whatever infrastructure is in place to automate such customization) ... and you probaly should. But you can also invest some of your time in adapting our skills so you're veryfortable using the default shell and the faster default editor. If you find some system starting nano italic or some other editor when you runmands that try to automatically invoke editors for you then add export EDITOR=$(which vim) italic (or which vi) italic ... to your environment Combine these previous two suggestions. Use set -o vi italic with bash italic to set yourmand line and history editing key bindings to a subset of vi italic bindings. I also like to add bind C-lclear-screen C-plete italic ... to regain a couple of settings from the default ( emacs italic mode) bash italic settings. Also use the italic fc italic (the fixmand)mand (it's in bash italic Korn shell and probably zsh) italic . fc italic launches your preferred editor to allow full screen editing of somemand or range ofmands from your history. This is particularly handy when using cut & paste from web browsers other terminal windows and editors withplexmands. (Frequently you have to copy several different excerpts from such sources ... and doing so with separate operations for each is tedious and time consuming). With fc italic you simply do a sloppy copy of the whole passage containing the various bits of you need and all the cruft you want to remove. The issue amand like fc for Enter code ... paste is the whole mess and then use your favorite editingmands and macros to formulate the rest of yourmand. (In this example it would be your most recent for italic mand and you'd presumably be pasting in a list of targets to iterator over and a body ofmands to execute on each for example). When you save and exit ... themand is automatically executed by your shell. Obviously when the changes are simple then you can save keystrokes by using the various old csh italic patible ! italic history operators including ^ italic (for example changing something like foo to bar in the most recentmand using ^foo^barEnter italic ). But if you spend a lot of time doing ad hocplex multi-linemands .... fc italic can't be beat. Amon shell pattern I use goes something like this d='x xxx xxx ... code y yyy yyyy ... code z zzzz zzzz ... code ...' code echo $d | while read h f r; do echo do_something $h --someswitch $f --otherswitches $r; done code In other words use a shell variable to hold some lines of each line containing some arguments (all usually prepared in my editor in another window usually with creative database or other searches and so). Then iterate over those filling in amand template with my hostnames ssh italic mands and switches and so on. I run that once and look over the output to see if the generatedmands look right. After that I can use ^do echo^do italic ... to reissue the samemand but actually to do_something italic rather than merely inspecting what the resulting template rendering looks like. One trick there is that you can store a significant amount of arbitrary in a shell variable (easily over a 1K) and use that instead of temporary files for most purposes. You can iterate over lines and parse them into variable lists using the | while read x y z; do ...; done italic pattern. When parsing (separating the lines into fields into which to associate the variables (x y and z here) then your shell's IFS italic setting will be used (so you handle trivialma-separated or colon delimited files for example). Additionally the read italic mand will respect any quoting in the input line (consistent with the shell's normal quoting and escaping rules). Also all remaining contents on the line will be assigned to the last variable on the list. Overall I refer to this latter pattern | while read ...; do ....; done italic as the pipemill italic pattern. You're writing code to mill over the output from a pipe. It's very simple example of the producer-consumer pattern and is the most flexible simple shell scripting pattern I've ever found. You can also do stuff like ifconfig -a | egrep 'Link |inet ' | while read iface x;read x a x;do echo $iface $a##*; done italic ... italic to read the first and second line of each interface description from the ifconfig -a italic output (the egrep italic regular expression is set ot a couple of patterns that only occur on the first and second lines respectively). So we read each of those in our while loop using the variable x italic repeatedly to throw away the fields we're not interested in. Then we output just the interface name from the first line and just the IP address from the second line (stripping off the stuff up to the in that field using a bash italic parameter substitution). That's a trivial example but shows that the pipemill is not limited purely to consuming inputs oriented on single lines for each job. You can also throw away a header line using something like ps laxwww | read x; while read x u p ppid x x x x x state x x cmd args; ... done; italic ... here we throw away the header line printed by ps italic and we grab just the columns we're interested in (user PID Parent PID the process state themand's name or argv italic and the read of themand's arguments. This is handing for find italic zombies and killing their parents for example). The next productivity suggest enhances what I've already said. Use GNU screen italic ( GNU Screen - GNU Project - Free Software Foundation ) ... or tmux italic ( tmux ). I rmend the former for the same reason I rmend bash italic over its alternatives. GNU screen italic is installed on most Linux and other modern Unix-like systems by default. However this suggestion is weighted less heavily since you'll normally only be running console multiplexer ( screen italic or tmux italic ) on your local workstation or a preferred jump box or control tower system. The advantage of these systems is that you can maintain a persistent session with all your shell sessions connected to various different systems and running various programs all over the place. You can detach re-attach even allow others to connecte and share your session (obviously only your most trusted colleagues for you main session --- though you can also co-ordinate to run separate liaison sessions as necessary). GNU screen italic in particular also has some fairly advanced backscroll search and keyboard driven cut-n-paste features and macroing. In my daily usage pattern I maintain a notes editor in my first screen italic window. It runs vi italic with a macro for inserting the current date stamp using a single keystroke (F8 in my case). I almost always just work at the bottom of the file and let it grow arbitrarily large. Any time I exit the wrapper script around it mails me a copy. I use this for most of the cases where I would use fc italic (as described above) ... but I just leave the contents there (notes for the future) and paste the results into my other windows to execute asmands etc. When Imit changes to git italic I paste the output from git log italic into my notes; when I'm working on a Jira ticket I paste the URL into my notes (where I can go back right click on it and bring that back up later). When I edit a file on production system (if it's not under some sort of git italic or other version control) I paste a copy into my notes (and usually also into a Jirament). When I use some web based dashboard or work on something from PagerDuty or from any web based Nagios ( Check_MK Thrux Opsview) italic front end I paste the ReSTful URLs into my notes. Gnu screen italic uses vi italic -keybindings for most of its scroll buffer operations and similar features by default. So using it also builds on the same principles that I mentioned earlier. Master vi italic and use those bindings in your shell and everywhere else that the readline italic libraries allow it (via the ~ italic settings for example). I enable them in iPython italic as well. I also frequently use iPython italic for munging data into some form I can use for all this other work. For example on my current contract my boss ends up with various Excell spreadsheets from which he needs to extract data. I usually just export those to .CSV read and parse them in an interactive session and write the results out as . In one recent case he had to versions of the same spreadsheet (last month and current) and wanted to know which hosts has been added or removed from one to the other. It only takes a couple minutes to read in both extract that column from each storing each in a Python set() italic and then take the differences in each direction and finally print the sorted results from each (paste into my notes and into the e-mail response for him). In another case he a long spreadsheet listing every incident of server downtime across our production clusters for the last three monts and he wanted to know which systems appear most often in that list. (This is basically what you'd get by piping just the relevant portion through sort | uniq -c | sort -nr | head -n XX italic ... but in this case I did it using the Python italic class and its .mostmon() italic method). (I also used iPython's italic %save italic mand to save that session and whip the history into a script file for him to re-use from now on with similar data). For another case I used data from a table (Tab-delimited in this case) to generate the 4 or somands necessary to create a new cluster of clusters. The columns in the table were hostnames (which I'd generated using pattern strings with numbers interpolated into them) OpenStack image and flavor IDs (like AWS AMI and designations) as well as some networking data and other parameters. I simply interpolated the fields from each row into a nova boot italic mand (analagous to an aws ec2 run italic mand) and wrote the results into a file. Then I attached the file to the Jira ticket and ran it from the appropriate environment. (Yes much of the editing had gone through my notes file as well). The fact that my script is attached to the Jira ticket gives apletely unambiguous statement of work for later review and was handy when I was asked to change the capacity of one of the cluster s (I was able to simply paste a copy of the relevant lines from my script into a new script search and replace witih the bigger flavor --- kill the old instances and spin up their replacements. Adding or replacing nodes is also easy for anyone on the team because they have the exactmands easily attached. Building a whole new environment (staging for for a different region) is similarly easy. All these work flow practices work together. Gives me time to amuse myself on quora while looking productive. )
How do I open .sketch in Mac?
Editing a Sketch File on Windows or Mac 1 Go to s s . Photopea is a highly rated and suggested software that supports the editing of Sketch files. The software is free to use but you can also opt to pay $9 to get rid of the ads. This also works in your web browser so Photopea will work for both Mac and Windowsputers. 1 s#_note-1 3 Click Open . A file browser will open. Method2 Using Sketch on a Mac 1 Go to s s . The Sketch download will start immediately. If not click the try again near the bottom of the web page. 3 Open Sketch. Youll find this in the Application folder in Finder. 5 Click Open . A file browser will pop up. Method3 Viewing a Sketch File on PC or Mac 1 Go to s s . Sketch Web Viewer is a site that allows you only to view your Sketch project. 3 Navigate to and double-click your Sketch file. Your Sketch file loads in the viewer with information on elements. For example if your file has a banner layer across the top of the image you will see the length and of that box. ordered-list
What are some must-have software for programmers using Linux?
Have you ever watched a coding tutorial and saw a really slick editing interface with terminal split screens and a gorgeous color scheme? Here are the 3 tools that will get you the end result of a terminal like this n To learn how to configure these tools to get something akin to the screenshot above check out Codementor's tutorial to best set up your Linux development environment italic n Configuring Your Linux for Development With Zsh Tmux and Vim italic s Tools of the trade Zsh italic nBash is a nice default but were not here for defaults were here for the best we can get and that means Zsh and all the bells and whistles thate along with it. In a nutshell Zsh gives us a much more user friendly experience on themand line it gives us things like better autopletion Vim key bindings and smart guesses when you write amand wrong. Zsh has a huge usermunity behind it and those smart people have added many many customisations. Tmux italic nTmux is a terminal multiplexor. Sounds scary right? Well it isn at all. Tmux is a tool that allows you to split your terminal screen into any layout you want as well as run multiple terminal instances that are easily accessible. Tmux has be the go-to tool for some of the biggest neckbeards out there. Vim italic nVim is a editor and if you haven heard of it before well youre either going to love it or hate it. People who are fans of it love it because it is an extremely versatile customisable and powerful editor. Now for the sake of diversity there is another extremely powerful editor out there called Emacs which you should look into in your spare time and decide whether you would like to learn it. However note that both Vim and Emacs have an extremely steep learning curve in terms of how they allow you to manipulate . Source Tutorial Configuring Your Linux for Development With Zsh Tmux and Vim s
What are some good books for learning Linux bash or shell scripting?
Thanks for A2A. The other answers are all great. I would suggest you do the following (I suppose you want to really learn shell scripting) You need to have a good grasp of themand line and it tools. A very good introductory book that I highly rmend is The Linux Command Line A Complete Introduction (86144428173) William E. Shotts Jr. Books s=sr_1_5?ie=UTF8&qid=148592725&sr=8-5&keywords=shell+scripting . This book should probably be on your hands-reach bookshelf Linux Command Line and Shell Scripting Bible Richard Blum Christine Bresnahan 9781118983843 Books s=pd_sim_14_7?_encoding=UTF8&pd_rd_i=111898384X&pd_rd_r=KS4QQJZM3KRJXK6XNA&pd_rd_w=UH8wK&pd_rd_wg=eAQsO&psc=1&refRID=KS4QQJZM3KRJXK6XNA . I just love Wrox Programmer-to-Programmer italic series. This one on beginning shell scripting is a very good introductory course Beginning Shell Scripting 97876458329 Computer Science Books @ s=sr_1_2?s=books&ie=UTF8&qid=148592791&sr=1-2&keywords=wrox+shell+scripting . You will need to access the GNU Bash manual frequently (it has some good background material too). You can read the online version or download a PDF (among many other formats) from GNU Bash manual - GNU Project - Free Software Foundation s . At any time inoke info bash code . That might seem like a handful and it is italic . Don expect to cover all the manual in one setting. Expect to read it over and over in order to digest it. Get into the habit of firing up a terminal and invoking man bash code or info bash code whenever you are stuck. Those twomands can be life-saving. Trust me. I don need to give you the cliche practice is the best teacher. You already know that.
How can I write data in a Word or PDF document using C++?
There are a few Quora questions about this sort of thing How can I make a PDF file using C++? question qid 16544971 ++ How can I open a MS Word document and write data in it using C or C++? question qid 2627169 ++ Other resources you might find helpful include Opening an existing .doc file using ofstream in C++ s DocxFactory Project | Free and open source cross platform C++ library with C# Java Python Progress 4GL wrappers andmand line tools for generating Microsoft Word .DOCX (OpenXML) files.
I have a PDF file of 65 pages. How do I convert each page into a picture format offline?
Well PDFBox can do exactly this! Just have a look at and you can use themand line tool called PDFToImage. Just have a look at theirmand line usage. PDFBox is free and open source. It's actually a Java based library for manipulating PDF files. Ok I have some direct s for you #pdftoimage And to download the jar file here I hope you have Java in yourputer. If you are not sure just try themand in the by placing the jar in your C drive in case of Windows. Before trying themand inmand prompt be sure the current directory of the prompt is C do that you can access the jar you placed. In case of Linux place it in the home folder and run themand in the .