11

LAZY Agnostic Application Generators (padrino-lazy)

Overview Through padrino-lazy, we can include some common properties shared between the model object used a base model object Padrino is very good framework, and almost follows the DRY principle (Don’t Repeat Yourself) When we need to have some common properties shared between the model object of our ORM, using the generator padrino-gen, We can only include these properties in each model to generate. I hope this idea will be included in Padrino Framework....

May 21, 2011 · 2 min · Carlo Bertini [WaYdotNET]
#lazy #linux #orm #padrino #ruby #ruby #Script #tips #Uncategorized
11

automatic-screenshot-insertion-in-org

Original idea from http://emacsworld.blogspot.com/2011/05/automatic-screenshot-insertion-in-org.html Original script using imagemagick: Using scrot : (defun org-screenshot () “Take a screenshot into a time stamped unique-named file in the same directory as the org-buffer and insert a link to this file.” (interactive) (setq filename (concat (make-temp-name (concat (buffer-file-name) “” (format-time-string “%Y%m%d%H%M%S_”)) ) “.png”)) (call-process “scrot” nil nil nil “-s” filename) (insert (concat “[[” filename “]]”)) (org-display-inline-images))

May 4, 2011 · 1 min · Carlo Bertini [WaYdotNET]
#emacs #linux #org-mode #Script #Script #tips #tips
11

How to resize LVM logical volumes with ext4 as filesystem

# Unmount the filesystem and check its’ LV umount /mnt/foo e2fsck -f /dev/mapper/vg0-foo # Shrink ext4 and then the LV to the desired size resize2fs -p /dev/mapper/vg0-foo 40G lvreduce -L 40G /dev/mapper/vg0-foo # Before continuing, run e2fsck. If it bails because the partition # is too small, don’t panic! The LV can still be extended with # lvextend until e2fsck succeeds, e.g.: # lvextend -L +1G /dev/mapper/vg0-foo e2fsck -f /dev/mapper/vg0-foo...

February 3, 2011 · 1 min · Carlo Bertini [WaYdotNET]
#bash #ext4 #linux #lvm #resize #Script #Script #tips #tips
11

tips: search text into list file and order by date

Simple but power command to search text inside file ed order list file by date ….. thx to google and all user grep -rl ‘REGEX’ * | xargs ls -trl

January 13, 2011 · 1 min · Carlo Bertini [WaYdotNET]
#linux #Script #Script #tips
11

mini backup with rsync

#!/bin/bash # Backup file remote/local # By Carlo Bertini [WaYdotNET] # il tutto utilizzando rsync senza scomodare subversion # RSYNC OPTION # -r => ricorsivo # -l => copy symlinks as symlinks # -p => preserve permissions # -v => verbose # -u => update, ignorare i file che sono più nuovi nella destinazione # -a => archive mode # -z => comprime i file durante l invio # -h => rendere leggibile l output # –delete => cancello i file estranei nella destinazione...

July 1, 2010 · 1 min · Carlo Bertini [WaYdotNET]
#backup #linux #rsync #Script #Script #tips
11

how to highlight and bookmarks pdf files on linux

Because i need to highlight and bookmarks pdf file on linux/windows, only solution wich i’ve found is Foxit Reader 3.3.1 for Windows [UPDATE] Foxit Reader 4.0 for Windows link 06/29/10 The linux version is too old and not have these function, but with wine work well (you need also mdac2.8 and jet4.0) tips 4 me: create foxit in $HOME/bin #!/bin/sh wine /home/waydotnet/wine_tools/Foxit Reader.exe $1 and chmod +x foxit If you found another solution, please comment :D Bye

June 28, 2010 · 1 min · Carlo Bertini [WaYdotNET]
#ebook #foxit #linux #pdf #tips
11

Ubuntu 9.10 , run level 3 => installare driver Nvidia

Se dovete installare i nuovi driver Nvidia NVIDIA-Linux-x86_64-190.53-pkg2.run su ubuntu 9.10, dovete aver killato il server X … Girovagando su internet ho trovato un modo veloce, che non conoscevo [visto che sono praticamente nuovo su linux], per poterlo fare Tramite alt+ctrl+f1 entriamo in tty1 (conosole senza X) ed immettiamo : sudo /etc/init.d/gdm stop poi potete installare tranuquillamente i driver Nvidia su vostro Ubuntu :D

February 1, 2010 · 1 min · Carlo Bertini [WaYdotNET]
#linux #nvidia #tips #tips #ubuntu
11

[SOLVED] log4r 1.1.4 & ruby 1.9.1 => GDC.rb and NDC.rb syntax error, unexpected ':', expecting keyword_then or ';' or 'n'

EDIT: SOLVED , vedere commento :D log4r 1.1.4 & ruby 1.9.1 => GDC.rb and NDC.rb syntax error, unexpected ‘:’, expecting keyword_then or ‘;’ or ’n’ GDC.rb --- GDC.rb Thu Jan 28 17:03:12 2010 +++ GDC.rb.new Thu Jan 28 16:50:37 2010 @@ -13,10 +13,10 @@ private\_class\_method :new def self.check\_thread\_instance() - if ( Thread.main != Thread.current ): + if ( Thread.main != Thread.current ) raise "Can only initialize Global Diagnostic Context from Thread....

January 31, 2010 · 1 min · Carlo Bertini [WaYdotNET]
#linux #log4r #mingw32 #ruby #ruby 1.9.1 #Script