Watchless - a simple Bash helper for LESS to CSS compilation
Here is a simple Bash tool for LESS files compilation, watching your .less files using inotifywait and compiling CSS on file change.
Supports @import-ed files. Compiled files can go in the current directory or in another directory, keeping the directory structure intact (~/Project/less/style.less to ~/Project/css/style.css for example)
Not well tested, may be dangerous.
AUR: https://aur.archlinux.org/packages/watchless/
I place all my LESS files, along with all of the JavaScript files in a sub-directory called _src (for source files). The _scr folder is Cloaked so that it is not included in file transfers. The structure looks like
_src
js
bootstrap
..... // files go here
fonts
..... // files go here
jquery
..... // files go here
myscripts.js // scripts of my own that I want added
scripts.js // contains imported JS files that are combined and minified into one production script
less
bootstrap
..... // files go here
fonts
..... // files go here
footer.less //
form.less //
header.less // these files are for the various parts of the template and or documents
main.less //
nav.less //
styles.less // contains imported LESS files that are combined and minified into one production style sheet
I will then use PrePros to compile the JS and CSS files making for just two HTTP requests.
Have a look at source code (lines 7 and 110) of this site.
Incidentally, by using PrePros, not only do the LESS and JS files get compiled automatically, any saved changes are immediately visible in my browser without having to refresh each time.
Similar Messages
-
Simple transitions help for an FCP newbee
Am moving from iMovie6 to Final Cut Pro 5 as I didn't like iMovie8 and there's been a lot of talk on the iMovie board about how FCP will probably work better for people like me...
I'm a real newbee to FCP so I'm going to embarrass myself here and ask a really simple question that I can't for the life of me get an answer to.
How do you add a simple fade up to the start of a clip? It would seem that the Fade in-Fade out Dissolves in Effects is designed to join two different clips. I have a clip that cuts to black and the next clip I want to start on a fade up from black.
How do I do this?
Also, how do I do a really simple fade to black???
Forgive me for asking such a dumb question but I just can't find the answer in the Help file (guess the question is way too simple!).
Thanks!I just tried ramping the clips opacity and I got my fade in just fine, but in order to get the clip fading in from black, I had to go back to the rushes, reselect the clip I wanted and then when the cursor was at the start of the clip, open the opacity and adjust it to go from 0 to 100 in 12 frames. Then I added this clip to my timeline via overwrite, thereby overwriting the same (old) clip that didn't have the fade in. However, I'm not quite ready to mark this question as answered as how do I now add a fade in on a clip that is already in my timeline? Do I have to make the transition decision before I add the clip to the time line or is there some clever way of adjusting the opacity of the clip once it is in the time line and therefore in the edit?
Thanks! -
I bought a copy of Creative Suite Design Premium a year-and-a-half ago. Today, when trying to bring up a .pdf file I got a window that informed me I couldn't open Adobe Acrobat 8 Professional unless I opened another Adobe product first. I opened Photoshop and got a window stating that my trial version ends in five days. I clicked "OK" to get it running again but don't want to be without Adobe resources in five days. I spoke with customer support who informed me that I would have to pay $39 for technical support. After providing my opinion on that subject I chose not to pay the money. That's another issue, so I won't vent here about it.
Can anyone tell me how to solve this problem?
Thanks,
TimThanks for the reply, Mike. Other programs within the suite show only "deactivate" as a clickable choice. I assume that means the suite was activated. The Acrobat 8 program shows "Activate" but when following the arrow, shows only a grayed out "Active" "Deactive". Any advice on how to proceed?
Thanks,
Tim -
Simple bash-batch-compiler improvements
hey there,
i made a simple bash script for compiling many *.cpp files in one dir.
#! /bin/bash
find . -name "*.cpp" -exec g++ {} -o {}.sh \;
but if an *.sh already exists it shouldn't compile, also it would be nice to have it named program.sh not program.cpp.sh my bash skills are rather limited, think one could help me out folks
cheers,
dettoMh, got another one here :< Still didn't find a GOOD sed tutorial with regexp. It's so damn complicated in my eyes.
Well, I figured something out, but it has a error inside
for f in *.jpg ; do mv "$f" `echo "$f" | sed 's! 1280!!'` ; done
When executing it prompts for every *jpg file with "mv: specified target »(10).jpg« is no directory". :?
Last edited by detto (2007-03-15 13:26:52) -
"F4" search-help for custom field in PCUI
Hello all,
Does anyone know how I can create my own simple F4-help for a custom field I have added to a custom Tab Page in the PCUI? It should show a selection from a custom table.
I couldn't find an useable example in the PCUI-cookbook.
Any ideas anyone?
Kind regards,
Martijn de Jong.Hi Manuel,
I saw that paragraph but didn't know how to implement it. Maybe you or someone else can explain/translate in steps what I have to do, according to the text underneath, i want to use a combobox:
"If you want the application to specify the values for selection (within popup or dropdown list box or
combobox (COBX respectively TIME)) at runtime instead of using predefined domain values, data
must be provided by the application via the method FILL_DROPDOWN_LISTBOX. That scenario
works if the field type is "Input Field" and the F4 application is set to "VALUE_TABLE". With these
customizing settings, the method FILL_DROPDOWN_LISTBOX of the interaction layer is called at
runtime and the actual field values will be passed to the application via importing parameter
IT_SCREEN_STRUCTURE. Thus the application can provide context-sensitive help values within a
popup or a dropdown list box respectively combobox (COBX respectively TIME). Within the popup
more than one column of values can be displayed."
How/where do I (re)define method FILL_DROPDOWN_LISTBOX? Do i have to maintain an own class? and how do i ensure that more columns are shown?
Kind regards,
Martijn de Jong. -
Helpful Linux Bash Scripts for I.T. Admins
I was wondering if you guys had any recommendations for helpful / simple Bash scripts that do helpful tasks in regards to Linux system administration? I have never created or used a Bash shell script but know that many of you guys do. I have no programming experience what so ever so decided to ask if you guys do have one or few scripts that are useful in basic administration tasks, could you please post them or at least point someone who is interested in the right direction?
Thank you so much!I'm no sysadmin but one were to use command-line a lot i would give ZSH a shot. A nicely configured zsh shell can be unbelievably comfortable and is certainly a great tool.
As for scripts I always thought of them as little helpers customized for certain situations. For instance easing repetitive tasks, batching some steps and timing/automating little things. For general purpose I'd probably look at available software first.
Maybe tmux for terminal management, ranger for file management, a tiling window manager for efficiency, ssh and other survaillance/maintenance software? Personally, I'd very much like to hear, too, what software/scripts/.. linux systems admins use to keep the work to a minimum . -
MacBook Pro (15-inch, Late 2011) It turns on for less than 60 sec thens shutsoff by itself, it won't load to recovery hd partition, won't load to mac OS and already replaced with new MLB, but the problem still persist.. able to run ASD EFI but ASD OS wont work.please help thanks in advance
Holy crap, I got it to work.
Essentially, I just waited until DiskWarrior reached Step 9 and told it to skip the step before it had a chance to freeze. It skipped successfully, moved on, rebuilt and replaced the faulty directory files.
So far the computer is booting like normal, I can log in, and I'm currently copying all of the data to an external as I type this.
I still have no idea why the computer wouldn't mount or boot to any drive, but I guess I'll deal with that later. -
Hello!
I have had my Macbook Pro for less than 2 weeks. About an hour ago I turned it on and clicked on Safari. A pop up appeared...the usual "Congratulations! You are the Winner of.." etc etc. I have not downloaded anything from an unreliable source. I have quite honestly turned on the computer less than 10 times since getting it. The pop up prevents me from browsing the internet.
Please help! I did not think I would run into problems with the laptop so soon.
Thank you.
J.The Lion OS has a new feature that returns you to a "previous state" the next time an application is opened.
You can stop this behavior by holding down the option key when quiting an app or hold down the shift key when you launch an app. -
[solved]Need help with a bash script for MOC conky artwork.
I need some help with a bash script for displaying artwork from MOC.
Music folders have a file called 'front.jpg' in them, so I need to pull the current directory from MOCP and then display the 'front.jpg' file in conky.
mocp -Q %file
gives me the current file playing, but I need the directory (perhaps some way to use only everything after the last '/'?)
A point in the right direction would be appreciated.
thanks, d
Last edited by dgz (2013-08-29 21:24:28)Xyne wrote:
You should also quote the variables and output in double quotes to make the code robust, e.g.
filename="$(mocp -Q %file)"
dirname="${filename%/*}"
cp "$dirname"/front.jpg ~/backup/art.jpg
Without the quotes, whitespace will break the code. Even if you don't expect whitespace in any of the paths, it's still good coding practice to include the quotes imo.
thanks for the tip.
here it is, anyhow:
#!/bin/bash
filename=$(mocp -Q %file)
dirname=${filename%/*}
cp ${dirname}/front.jpg ~/backup/art.jpg
then in conky:
$alignr${execi 30 ~/bin/artc}${image ~/backup/art.jpg -s 100x100 -p -3,60}
thanks for the help.
Last edited by dgz (2013-08-29 21:26:32) -
Help required to find a simple htm editor for mac
Can you please help recommend a simple htm editor for mac?
Thank you.You could use TextEdit, which comes with all Macs, TextWrangler, or Smultron (no longer in development); all of these are free.
-
Simple bash scripting help needed..
I want to learn som simple bash scripting in order to automate various tasks.. Im totally noob, so bear with me
First of all I would like to set configs without using nano.. is there a simple command for this? For example if i want change my hostname in /etc/rc.conf.. how can i print the current vallue and how can i change it`?
i was thinking something like this to get the current value:
# cat /etc/rc.conf | grep HOSTNAME=
which returns HOSTNAME="myhostname"
how can i change this value with one or more commands whitout touching the rest of the file?abesto wrote:
A slightly naive solution:
CHOICE="lisa"
NAMES="homer marge lisa bart maggie"
if [ "`echo \" $NAMES \" | grep \" $CHOICE \"`" ]; then
echo "this is how you do it"
fi
The extra spaces inside the escaped quotes are to ensure that only a whole word is "matched".
You can also replace the elif's with a loop through a list of "the other variables". Then you'd use the loop variable instead of $CHOICE above.
grep can check on word-bounderies with \< and \>, or with the -w switch. The -q switch suppresses any messages and exits with exit-code 0 when the first match is found:
if echo "${NAMES}" | grep -qw "${CHOICE}"; then
Nice and readable, should work, but i haven't tested it
EDIT:
Procyon wrote:CHOICE="lisa"
NAMES="homer marge lisa bart maggie"
if [[ $NAMES =~ $CHOICE ]]; then echo match; fi
This one also matches elisa, ie. no check on word bounderies. You should be carefull with that
Last edited by klixon (2009-04-23 09:40:22) -
I've had this Mac for less than 6 months and worked fantastic until now. I'm not 100% familiar with Mac so any help would be helpful. Thanks!
Please describe the problem in as much relevant detail as possible. The better your description, the better the chance of a solution.
For example, if the computer is slow, which specific actions are slow? Is it slow all the time, or only sometimes? What other changes did you make, if any, just before it became slow? Have you seen any alerts or error messages? Have you done anything to try to fix it? Most importantly, do you have a current backup of all data? If the answer to the last question is "no," back up now. Ask if you need guidance. Do nothing else until you have a backup. -
pls i need help for this simple problem of my palm os zire 72. pls share your ideas with me.... i tried to connect my palm os zire72 in my desktop computer using my usb cable but i can't see it in my computer.. my palm has no problem and it works well. the only problem is that, my desktop computer can't find my palm when i tried to connect it using usb cable. is thier any certain driver or installer needed for it so that i can view my files in my palm using the computer. where i can download its driver? is there somebody can help me for this problem? just email me pls at [email protected] i really accept any suggestions for this problem. thanks for your help...
If you are using Windows Vista go to All Programs/Palm and click on the folder and select Hot Sync Manager and then try to sync with the USB cable. If you are using the Windows XP go to Start/Programs/Palm/Hot Sync Manager and then try to sync. If you don’t have the palm folder at all on your PC you have to install it. Here is the link http://kb.palm.com/wps/portal/kb/common/article/33219_en.html that version 4.2.1 will be working for your device Zire 72.
-
Looking for a simple drawing application for my grand-daughters
Well, that's more or less it, I'm looking for a simple drawing application for my grand-daughters. In the children section of iTunes store, there's only a few books and nothing more. I bought the iPad mainly for my grand-children to teach them a bit and I don't find interesting things for them.
Can anybody help me with that?
Pedro Godfroid GoffinBrushes is a nice finger drawing app. Since you didn't say how old they are, I don't know if the interface is to difficult for them to use.
Sketchbook is another nice drawing app.
Neither are free.
Glor -
Urgently need help for parsing IP header
Hi, could anyone tell which class I should use to parsing the IP header of a packet?
Thanks many many times!> Hi, could anyone tell which class I should use to
parsing the IP header of a packet?
DatagramPacket?
> Urgently need help for parsing IP header
Don't flag your question as urgent, even if it is for you.
* We all answer questions here voluntarily, in our leisure time. We do that because doing so is fun for us, because we enjoy helping people and having interesting discussions. Guess what, it is much less fun if it gets stressful. So the last thing you want to do to get us to answer your question is to pass your stress over to us.
* People who are stressed and want a fast answer often don't even find the time to do the necessary research or to formulate their question in an easy to comprehend way. That's even less fun to work with. So you really don't want us to feel your stress. Instead you want to take your time to write a well formulated post that is fun to answer. The less likely it is for us to know that your question is urgent, the more likely you are to get a fast answer!
* The simple notion that you want your post to be answered faster than those of the other members might feel rather unfair to some of us. Doubly so because often "urgent" questions actually are homework questions. Yours might be different, but someone who had bad experiences with this type of question might not read far enough to notice.
Maybe you are looking for
-
Need detailed information about u0093CALL CUSTOMER FUNCTIONu0094.
Need detailed information about CALL CUSTOMER FUNCTION.
-
Something changed firefox into a word document in cryllic how do I fix it?
some how firefox is now a word document. Desktop icon is also a word icon. When you click on it a word document pops up asking for file conversion with Windows cryillic the defrault. I am sure a virus did this. I have swept my machine, but cannot ins
-
Authorisation in xRPM for reviews
Hi Guies My requirment is - : system should allow to create reviews with read authorisation for bucket. Right now system does not allow to create reviews unless bucket has admin authorisation. How we can allow to create reviews with read authorisatio
-
D300 - Erasing Images After Import
After importing images from the camera, I don't get an option to erase the memory card in the camera - just a "Transfer Complete" kind of dialog with a single "OK" button. Anyone experienced similar behavior? Thanks...
-
Take Snapshot: File location change?
Whenever I take a snapshot of an iSight conversation that I'm having, the image goes directly to the desktop. Can I assign a folder location to where my snapshots will automatically save to? -M