come with me, on the way I'll explain.
Creating a lot of thumbnails with Shell script
This script create a thumbnail with width 100 of each png file in the actual directory.
#!/bin/sh for i in *.png do echo "convert -thumbnail 100 $i $i" convert -thumbnail 100 $i $i done
No trackbacks yet.
Congelando e Ressuscitando Processos
14 November, 2009 - 3:21 am
Tags: bash, batman, cli, cmd, Linux, mr freeze, pidof, posix, SH, shell, ubuntu, unix
Posted in português | 2 comments
Nem só de morte vive o kill.
Suponha que você tem um processo chamado program e quer congelar seu funcionamento. Para congela-lo sem mata-lo você pode mandar um sinal SIGSTOP com:
kill -s stop `pidof program`
Para ressuscitar o mesmo processo:
kill -s cont `pidof program`
Java, showing script engines
10 September, 2008 - 3:18 am
Tags: Java, JavaScript, JSR 223, Rhyno, script, ScriptEngine
Posted in english | No comments
A simple code to show the script engines installed in your system.
As it uses the JSR-223 you need at least java 6.
import javax.script.ScriptEngineManager;
import javax.script.ScriptEngineFactory;
import java.util.List;
public class ListEngines {
public static void main(String[] args){
ScriptEngineManager manager = new ScriptEngineManager();
List <ScriptEngineFactory> engines = manager.getEngineFactories();
for(ScriptEngineFactory engine: engines){
String name = engine.getEngineName();
String lang = engine.getLanguageName();
String ver = engine.getLanguageVersion();
System.out.println(name+" [...]
Script to Installing JavaFX Compiler
16 July, 2008 - 3:10 am
Tags: installing, JavaFX, javafx compiler, javafxc, script, tutorial
Posted in english | 2 comments
Right in this moment you can choose between three options to develop JavaFX:
Use the old version of JavaFX, interpreted. Not recommended.
Use the JavaFX Milestone 3. Little bit old but more stable.
Use the JavaFX Continuous Build. Is more dangerous but give us fresh builds.
I did this little script to download the last version of [...]
Terminal with colors in OpenSolaris
7 May, 2008 - 11:51 pm
Tags: bash, bashrc, colors, ls, Opensolaris, script, Solaris, Sun, terminal
Posted in Uncategorized | 5 comments
As the earlies versions of OpenSolaris, my terminal is without colors. That’s a little annoying. As the default user uses Bash you can configure your Bash options in the file ~/.bashrc. Insert in the last lines of your .bashrc file:
alias ls=’ls –color=auto’
Save, close and open your terminal (or just type source ~/.bashrc).
JavaFX: Color picker
19 February, 2008 - 10:56 pm
Tags: color, color picker, colors, draggable, JavaFX, jfx, jfxbest, netbeans, openjfx, screencast, script, vídeo
Posted in english | 2 comments
An simple color picker that can be also used as a gadget.
import javafx.ui.*;
import javafx.ui.canvas.*;
var colors = [red:Color, orange:Color, yellow:Color, green:Color,
cyan:Color,blue:Color, magenta:Color, gray:Color];
var chosenColor: Paint;
chosenColor = black:Color;
var x = 120;
var y = 70;
Canvas{
content: Group{
transform: bind translate(x,y)
[...]
Draggable and Growable Ball in JavaFX
16 February, 2008 - 9:41 pm
Tags: ball, código, draggable, event, growable, Java, JavaFX, jfx, jfxbest, openjfx, Programação, red ball, script, vídeo
Posted in english | 2 comments
Two simple JavaFX code handling onMouseDragged event.
import javafx.ui.*;
import javafx.ui.canvas.*;
Canvas {
content: Circle {
var x = 50
var y = 50
transform: bind translate(x, y)
[...]
JavaScript: Relógio Digital
2 September, 2007 - 10:47 pm
Tags: clock, ecmascript, JavaScript, js, Programação, relógio, script
Posted in português | 1 comment
Código-Fonte
Aqui na página colocamos:
<input type=’text’ value=’00:00:00′ id=’relogio’ readonly size=’6′
style="font-size: 200%; color:red"/>
<script type="text/javascript" src="/scripts/relogio.js"></script>
Que cria um input de texto com nome relógio e depois chamamos o script relogio.js que contém o seguinte código:
function proximo_segundo(){
var hoje = new Date
var hora = hoje.getHours()
var minutos = hoje.getMinutes()
var segundos = hoje.getSeconds()
relogio = document.getElementById(’relogio’)
relogio.value = hora +":"+minutos+":"+segundos
setTimeout(’proximo_segundo()’,1000)
}
proximo_segundo()
Ele cria um objeto Date, [...]













25 September, 2008 - 9:12 am
Para fazer isto em uma única linha:
convert -quality 70 -resize 10% *.jpg images.jpg
Para fazer uma montagem
montage *.jpg -shadow -geometry +10+10 montagem.jpg
Para mais detalhes:
* http://linuxdicas.wikispaces.com/imagemagick
25 September, 2008 - 9:27 am
Sérgio, valeu, era isso mesmo que eu estava procurando quando fiz esse script.