How to watch for changes to HAML files and save them - haml

I want to run a HAML command every time I save a particular file. I know this can be done by compass but only for sass not HAML has anyone done this or guide me how to.

On MacOS (and I assume, on linux too) you can use the 'watch' command from the terminal.
First, you need to install it using, for example "homebrew"
brew install watch
and then you can run it like:
watch haml haml/mypage.html.haml html/mypage.html

Or if anyone stumbled in here like I did. There is a newer tool: LiveReload that does all these automatically and more.

Sure, check out StaticMatic, nanoc, or Webby (search for these on gitHub). You can make them work with Compass too.

Related

Elm make on save, hot reload

I have elm reactor serving my pages while developing. After saving my code changes, I am running elm make src/Main.elm --output=main.js. Is there a way to auto elm make on save and see the changes on the browser?
I'm using elm 0.19
Update for 2021:
These days I would just use Parcel JS. It support hot reloading and is easy to setup in general: https://parceljs.org/languages/elm/
Old answer:
I had the same issue.
At first I used a custom script in my Atom environment, but then I found Elm Live: https://github.com/wking-io/elm-live.
Does all you ask. Highly recommended! Automatically recompiles, hot reloads and opens the browser window if not opened.
First install with NPM: (I used some issues with the latest version)
npm install --save-dev elm elm-live
Then use the command instead of the one you're using now:
elm-live src/Main.elm --open -- --output=main.js
I think you'll need to use a proper build environment to get hot reloading. The one I created and use is at https://github.com/simonh1000/elm-webpack-starter

Syntax highlighting for Pycharm - TextMate Plugin [duplicate]

I found this but honestly not sure how to install it or whether it applies. Thanks!
Ruby plug-in that you have linked is designed for IntelliJ IDEA Ultimate only, it will not work with PhpStorm. See this answer for more details.
However, it's possible to get the basic syntax highlighting for Ruby files in PhpStorm using the TextMate bundles support plug-in. It's already included with PhpStorm 6.0.1 and you don't need to install it, just make sure it's enabled in Settings | Plugins.
Git clone Ruby.tmbundle into some directory.
Add this directory in Settings | TextMate Bundles:
For some reason PhpStorm TextMate Bundles support will not recognize *.rb files as supported by this bundle. To fix this problem open Ruby.tmbundle\Syntaxes\Ruby.plist file in some text editor, find <key>fileTypes</key> section, add <string>rb</string> under <array>
(the above should be fixed in the latest Ruby bundle version, so the editing the bundle is no longer needed, but if you are adding some other language bundle, it's something you may need to adjust)
Restart PhpStorm, verify that *.rb is now associated correctly:
Now you get Ruby syntax highlighting in PhpStorm:
If you need full support for both Ruby and PHP (plus much more) in a single IDE, consider using IntelliJ IDEA Ultimate.
CrazyCoder's git repo doesn't work in windows systems, as a large number of the filenames are invalid in Windows.
I have, however, found the official repo for ruby for textmate:
https://github.com/textmate/ruby.tmbundle
I actually copied over my PhpStorm theme to RubyMine with no issue, so it should go both ways.
I went as far as to create a TextMate keymap for PhpStorm as well, you can take a look here: http://tentaclecms.com/blog/2013/08/textmate-keymap-for-phpstorm/

Install LESS compiler and setup bootstrap workflow in Ubuntu

I am a php developer and have not done much front-end work for 3 or 4 years so I feel its time to update my skill set. I want to install a less compiler and set-up a bootstrap work flow using my Ubuntu desktop. I know how to use the basic pre-compiled bootstrap but I’m kinda lost with all this LESS stuff. I need to use it as I want to shoehorn bootstrap onto an existing application that has all its own css classes in the html output that cant really be changed easily. So Ill need to extend the LESS files to add these classes to the boostrap css.
I am just not sure where to start. Does anybody know of tutorial that will walk me through installing and setting up the LESS complier then how to use it so that I can work in an efficient way. Iv searched but can really find any Ubuntu specific or up to date tuts.
For installing less, you can use lessc:
it is a node.js package which convert less to css, with several options:
http://lesscss.org/#using-less-installation
You need to install npm before
Full installation:
# apt-get install npm
# npm install -g less
And to use, as explained in the doc, just use lessc package.
For me, when I work with less, I use Bracket editor: http://brackets.io/
You can then install an extension which, when you save less file, automaticaly compile less to a css file: https://github.com/jdiehl/brackets-less-autocompile
(you find it with built-in extension manager)
Maybe for others IDE / editor, you have also plugins

Run a non-jRuby project after installing jRuby (or remove jRuby)

I installed jRuby to try it in a new project, but I didn't think it would affect my entire Ruby installation.
Now when I try to start an old project, I get an error
/usr/bin/env jruby: no such file or directory
I've tried searching for how to remove jruby, but don't come up with anything. is there a nice way to get my rails apps working again with regular ruby?
I REALLY hope so.
Looks like it created symlinks; point them back at at the Ruby you want to use.
Use something like rvm to avoid this. (Or rbenv if you prefer.)
Rerun "bundle install" -- if you ran bundle install under jruby, the shebang for your scripts in the /bin folder was likely changed to reference jruby. By re-running bundle install under MRI, bundler will fix the shebangs for you.

Installing .deb from MobileSafari

Does anyone know how to make .deb files install directly from MobileSafari on the iPhone/iPod touch/iPad? I know it's possible, as seen with the 'lima' project, but I have no idea what it's supposed to be written in, or how. If someone could tell me I'd be grateful. Thanks in advance.
While this is not a detailed answer to your question, it shows the way on doing it:
1st: A download plugin for MobileSafari to actually download the .deb
2nd: Once the download has been completed you execute dpkg -i /path/to/package.deb (for example via system()
But this won't take care about dependencies and other things which is important when dealing with DEBIAN packages. For that you'll have to utilize the apt library like Cydia does.