顯示具有 應用程式 標籤的文章。 顯示所有文章
顯示具有 應用程式 標籤的文章。 顯示所有文章

2023年10月2日 星期一

[Ubuntu] 沒事千萬不要亂升級

每次只要想到升級頭就痛,總是會有出不完的包。 

這次因為想安裝 tigervnc,好像不得已只能從 ubuntu 16 升級到 ubuntu 18 (荒謬吧,因為需要安裝一個應用程式而升級!) 

過程中需要先更新所有應用程式,然後發現有三個程式不好升級,包括 code、firefox(我有用特定版本)、google chrome(莫名其妙的不能升級到最新版),所以就大膽的移除這三個應用程式後升級。

升級當然不會這麼順利,後來因為 Python 的連結有誤,搞了一下都沒成功,又擔心發生僅次於 rm -rf 的慘案,之前有太多神秘的問題花了很多時間解決...

簡單說,最後沒有升級到 18,然後還是順利安裝 tigervnc,但 google chrome 搞很久,一會是不能安裝,看了這篇和這篇勉強安裝到最新版,發現不能切換新酷音!! 

最後最後,爬文找了許久,死馬當活馬醫,裝了舊版(103.0.5060.114-1)竟然就可以了。 

 

沒事千萬不要亂升級

2023年9月3日 星期日

[Tips] 在 Linux 將 PDF 轉成 JPG

目前使用這個指令列最開心,會把 PDF 所有頁面轉成一個一個的圖檔(應該也可以特定頁面) 

``` 

pdftoppm -jpeg -r 300 input.pdf output 

``` 

 

但網路上蠻多人是使用 imagemagick 轉檔的 

``` 

convert -density 300 -quality 100 in.pdf out.jpg 

``` 

reference: 

* https://stackoverflow.com/questions/43085889/how-to-convert-a-pdf-into-jpg-with-command-line-in-linux

2019年8月8日 星期四

[Tips] File upload

這篇寫的不錯,比較了 multipart/form-data 和 application/x-www-form-urlencoded 的分別


https://stackoverflow.com/questions/8659808/how-does-http-file-upload-work

2019年7月19日 星期五

[Tips] MOV 轉 MP4 並且縮小檔案

# 這應該最好用吧
avconv -i input.mov -s 1920x1080 -strict -2 output.mp4

ffmpeg -i input.mov -vcodec copy -acodec copy input.mp4
ffmpeg -i input.mp4 -vf "scale=iw/2:ih/2" -strict -2 half_the_frame_size.mp4  

* https://www.youtube.com/watch?v=8GNlfK8G_AI
* https://stackoverflow.com/questions/12026381/ffmpeg-converting-mov-files-to-mp4
* https://unix.stackexchange.com/questions/28803/how-can-i-reduce-a-videos-size-with-ffmpeg

2019年1月16日 星期三

[Tips] 轉檔

mov 轉 mp4
ffmpeg -i movie.mov -vcodec copy -acodec copy out.mp4

再把檔案縮小(half the frame size)
ffmpeg -i input.mp4 -strict -2 -vf "scale=iw/2:ih/2" half_the_frame_size.mp4

將影片轉成檔案(jpg)
ffmpeg -ss 00:00:00 -i input.mp4 -r 10.0 %04d.jpg

2018年12月26日 星期三

[Tips] 縮網址

代辦事項,縮網址
https://www.sitepoint.com/building-your-own-url-shortener/

2018年12月14日 星期五

[Tips] DOT

今天聽到的新東西
dot graph description language

2018年8月9日 星期四

[Tips] Virtualbox網路互通

如何讓 Virtualbox 的 Host 和 Guest 網路互通?

簡單說要在 Virtualbox 的偏好設定多加一張 host only 網卡,然後在開啟的 VM 上多新增一張 host-only 的網卡,指到剛剛設定好的那張。









參考: https://askubuntu.com/questions/198452/no-host-only-adapter-selected

2018年2月26日 星期一

[Tips] 線上去背

有幾套很神奇,但都要收費,如果偶而用一下真不想付錢 QQ

這服務免費而且有教學
http://www.online-image-editor.com/
http://www.online-image-editor.com/help/transparency

2018年2月25日 星期日

[Tips] wireshark在ubuntu16看不到網路裝置

sudo adduser $USER wireshark 參考這篇的,但還沒重開機和登出,不知道是否有效? https://self.jxtsai.info/2016/10/wireshark-for-ubuntu.html

2018年1月23日 星期二

[Tips] hackpad to hackmd

要改為 markdown 語法,要一篇一篇改?
https://domchristie.github.io/turndown/

2018年1月15日 星期一

[Tips] X Over SSH2 - A Tutorial

全文轉錄好像有時候還是必須的?
http://www.cnblogs.com/dabaopku/archive/2010/12/03/1895828.html
http://owen-hsu.blogspot.tw/2012/10/rpi-x11-forwarding-over-ssh2.html
https://resque.wordpress.com/2010/12/31/x11-ssh-remote-display-x11-forwarding/
http://www.timelordz.com/wiki/SSH_Over_X

2017年8月19日 星期六

[Tips] 分散式CMAKE(待測)

之前用過 distcc 編譯小的函式庫, 有時候快有時候慢

最近開始做 ROS, 編譯 190 個套件要數個小時(>3), 該試試看用 distcc 會不會改善吧
http://pointclouds.org/documentation/advanced/distcc.php



2017年8月3日 星期四

[Tips] Copy-Paste in xfce4-terminal adds 0~ and 1~

怪問題, 複製貼上會在前面加上 0~ 最後面加上 1~

但開新的 terminal 就沒事, 不過這篇有提到, 留著備考吧

https://unix.stackexchange.com/questions/196098/copy-paste-in-xfce4-terminal-adds-0-and-1

2017年7月30日 星期日

[Tips] 好用的抓圖軟體@Ubuntu

byzanz 看起來更好用, 直接輸出成 gif, 可以說是長得放 youtube, 短的就用 gif

reference: https://askubuntu.com/questions/107726/how-to-create-animated-gif-images-of-a-screencast

2017年7月22日 星期六

[Tips] 使用 DynDNS 連回自己的電腦

1. 先使用 10 minute mail 註冊一個 noip 帳號, 要記得帳號密碼

2. 然後下載原始碼後編譯
$ cd ~
$ wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
$ tar xf noip-duc-linux.tar.gz
$ cd noip-2.1.9-1/
$ sudo make install

接著就會問你問題, 參考如下
if [ ! -d /usr/local/bin ]; then mkdir -p /usr/local/bin;fi
if [ ! -d /usr/local/etc ]; then mkdir -p /usr/local/etc;fi
cp noip2 /usr/local/bin/noip2
/usr/local/bin/noip2 -C -c /tmp/no-ip2.conf

Auto configuration for Linux client of no-ip.com.

Multiple network devices have been detected.

Please select the Internet interface from this list.

By typing the number associated with it.
0    eth0
1    eth0
2    wlan0
3    eth1
3
Please enter the login/email string for no-ip.com  foo@bar.net
Please enter the password for user 'foo@bar.net'  *******

Only one host [foo.ddns.net] is registered to this account.
It will be used.
Please enter an update interval:[30] 
Do you wish to run something at successful update?[N] (y/N)  y
Please enter the script/program name  foo

New configuration file '/tmp/no-ip2.conf' created.

mv /tmp/no-ip2.conf /usr/local/etc/no-ip2.conf

設定檔路徑為 /usr/local/etc/no-ip2.conf

3. 啟動 client, 會重新註冊 IP
sudo /usr/local/bin/noip2

如果沒問題的話, 應該就可以從外部看到 foo.ddns.net 的結果了


reference:
* http://www.darwinbiler.com/dynamic-dns-using-raspberry-pi/
* http://www.awesomeweirdness.com/projects-diy/raspberrypi/setup-noip-client-raspberry-pi/

這篇寫得不錯, 應該會有兩個東西要設定, 另一個是把 DUC 當 service 跑起來
DUC Client 和 No-IP DUC Client service
* http://sizious.com/2017/04/30/how-to-properly-install-no-ip-dynamic-update-client-duc-under-raspbian/

備註; 如果在防火牆後面可以使用 dataplicity 這服務 

2017年7月15日 星期六

[Tips] 錄桌面 & 影片剪輯軟體 @ Ubuntu

最近想要開始搞錄影, 會需要影片編輯, 還需要錄製桌面

錄桌面用 gtk-recordmydesktop 應該是最容易入門的, 只是還要轉檔

轉檔可以參考 Tsung 這篇:
https://blog.longwin.com.tw/2009/04/linux-record-recordmydesktop-2009/

$ mencoder out.ogv -nosound -ovc lavc -o out.avi

要有聲音的話需要安裝套件
$ sudo apt-get install flac lame
$ mencoder out.ogv -oac mp3lame -ovc lavc -o out.avi