SoftfWare
Table of Contents
Firefox
Dropbox
Why aren't certain files on one computer syncing to another
https://www.dropbox.com/help/145/en
- Check bad files:https://www.dropbox.com/bad_files_check
- Incompatible characters with Windows
When naming your files, avoid characters incompatible with the
Windows file system:
< (less than) > (greater than) : (colon) " (double quote) | (vertical bar or pipe) ? (question mark) * (asterisk)
- Monitoring more than 10000 folders
The Linux version of the Dropbox desktop application is limited
from monitoring more than 10000 folders by default. Anything over
that is not watched and, therefore, ignored when syncing.
This command will tell your system to watch up to 100000 folders. Once the command is entered and you enter your password, Dropbox will immediately resume syncing.
echo fs.inotify.max_user_watches=100000 | sudo tee -a /etc/sysctl.conf; sudo sysctl -p
- Turning on extended attribute (xattr) support in Linux Some Linux distributions have extended attributes (xattrs) turned off by default. If you're running a Linux distribution with an ext3 or ext4 file system, it's possible to turn on xattr support, typically through your /etc/fstab settings file. Please refer to your Linux distribution's documentation for instructions.
Ubuntu 下让sublime-text3支持中文输入法
下载 sublime-imfix.c 并保存在sublime安装的目录下 sublimetext3默认安装的目录:=/opt/sublimetext/=
安装C/C++的编译环境和 gtk libgtk2.0-dev
并编译:
sudo apt-get install build-essential
sudo apt-get install libgtk2.0-dev
gcc -shared -o libsublime-imfix.so sublime-imfix.c `pkg-config --libs --cflags gtk+-2.0` -fPIC
启动 Sublime Text 试一试,可以使用fcitx输入中文了
LD_PRELOAD=./libsublime-imfix.so subl
mv libsublime-imfix.so /usr/lib gksu gedit /usr/share/applications/sublime-text.desktop # change Exec=/opt/sublime_text/sublime_text %F to Exec=bash -c 'LD_PRELOAD=/usr/lib/libsublime-imfix.so /opt/sublime_text/sublime_text' %F # change Exec=/opt/sublime_text/sublime_text -n Exec=bash -c 'LD_PRELOAD=/usr/lib/libsublime-imfix.so /opt/sublime_text/sublime_text' -n # change Exec=/opt/sublime_text/sublime_text --command new_file Exec=bash -c 'LD_PRELOAD=/usr/lib/libsublime-imfix.so /opt/sublime_text/sublime_text' --command new_file
Set Up Sublime Text for Markdown Editing
Install the MarkdownEditing package
- Type control+shift+p to call up the Command Palette.
- Type "install" and hit enter. Wait for the package list to appear.
- Type "markdown", hit the arrow keys a couple times to select "MarkdownEditing", and hit enter.
- Restart Sublime Text.
Install the Markdown Preview package
homepage: Sublime Text 2/3 Markdown Preview
- Type control+shift+p to call up the Command Palette
- Type "install" and hit enter. Wait for the package list to appear.
- Type "markdown preview", hit the arrow keys a couple times to select "Markdown Preview", and hit enter.
- Edit your "Key Bindings - User" file by using the menu items: Preferences > Key Bindings - User (or use the Command Palette).
- Add the following entry to your "Key Bindings - User" file. If you
have other key bindings in your file, be sure there are commas
between them.
{ "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} } #or use github parser { "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"github"} }
cartoon face
design card
QR code maker
Linux下批量缩小图片
装上Image Magick:
sudo apt-get install imagemagick
- auto rename
convert -resize 50%x50% photos/*.jpg small/
- the same name
for img in `ls photos/*.JPG`; do convert -resize 50%x50% $img small-$img; done for img in `ls ./*.JPG`; do convert -resize 25%x25% $img ./small/$img; done
- More
image MagicK 是一个强大的图象处理工具包。它提供了几个非常方便的命令行命令: display, animate,import, montage,mogrify,identify等,可以进行图象的显示,缩放,旋转,调色,加框,加注释等,还能制作GIF动画,图象索引,能自动生成图象. 1. 制作索引图和动画 !/bin/bash montage -bordercolor red -borderwidth 3 -label "%f" -tile 5x3 *.JPG montage.jpg mogrify -format gif *.JPG display montage.jpg animate *.JPG 2. 缩放 convert -sample 80x40 input.jpg output.jpg #注意:缩放后图像保持原来的长宽比例 convert -sample 25%x25% input.jpg output.jpg 3. 为当前目录的所有图像生成缩略图 for img in `ls *.jpg` do convert -sample 25%x25% $img thumb-$img done 4. 获取文件信息 libtiff tiffinfo filename.tiff pnginfo filename.png 5. 可以使用 ImageMagick 的 identify identify -verbose sample.png identify -format "%wx%h" sample.png 6. 旋转图像 convert -rotate 90 input.jpg output.jpg 7. 更改文件类型 convert input.jpg output.png 8. 为图像增加注释文字 convert -font helvetica -fill white -pointsize 36 \ -draw 'text 10,50 "Floriade 2002, Canberra, Australia"' \ floriade.jpg comment.jpg convert -font fonts/1900805.ttf -fill white -pointsize 36 \ -draw 'text 10,475 "stillhq.com"' \ floriade.jpg stillhq.jpg 9. 特殊效果 convert -charcoal 2 input.jpg output.jpg #炭笔 convert -colorize 255 input.jpg output.jpg #着色 可以指定三种颜色 red/green/blue convert -implode 4 input.jpg output.jpg #内爆效果 convert -solarize 42 input.jpg output.jpg #曝光,模拟胶片曝光 convert -spread 5 input.jpg output.jpg #随机移动,参数是位移大小 10. 一次执行多个操作 convert -sample 25%x25% -spread 4 -charcoal 4 input.jpg output.jpg
压缩JPEG图像
安装jpegoptim
$ sudo apt-get install jpegoptim
- 无损地压缩一副JPG图片
$ jpegoptim photo.jpg
- 想保护原始图片,使用"-d"参数指明保存目录
$ mkdir ./compressed $ jpegoptim -d ./compressed photo.jpg
- 有损压缩JPG图像, 用50%质量压缩图片
$ jpegoptim -m50 photo.jpg
- 压缩多张JPEG图像
for i in *.jpg; do jpegoptim -d ./compressed -p "$i"; done
smartgit uses Java 1.8
- Download the appropriate .tar.gz bundle for your platform of the Java 8 Runtime Environment from: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
- Unpack the bundle to a directory of your choice, for example to /opt
sudo tar -xzf jre-8u121-linux-x64.tar.gz -C /opt
- Tell SmartGit to use this JRE by adding following line to
~/.smartgit/smartgit.vmoptions
:jre=/path/to/your/jre For example: jre=/opt/jre1.8.0_121
- Restart SmartGit
Windows系统中访问Linux分区
- Ext2Read: 小巧,绿色,以管理员权限打开就能以exploer模式访问 ext2/ext3/ext4文件系统。缺点是只能读,不能写,性能略差。
- Ext2Fsd Project: 是个windows下的驱动程序,允许在windows下访问 ext2/ext3/ext4文件系统,可以设置编码,分配盘符,更可以在windows下读写。需要安装。