Skip to content

Instantly share code, notes, and snippets.

Silviu Vulcan silviuvulcan

Block or report user

Report or block silviuvulcan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
silviuvulcan /
Created Aug 18, 2014
download list of youtube urls
if [ ! -f $1 ]; then
echo "I need url list"
exit 1
cat $1 | while read url; do
youtube-dl -c --write-description --max-quality H264 -c $url
silviuvulcan /
Last active May 31, 2018
Add torrents to remote transmission machine (from firefox)
ssh $REMOTE "/usr/bin/transmission-remote --add \"$1\""
silviuvulcan /
Created Aug 19, 2014
restart remote service if it's running (postfix, apache)
# postfix
tentakel -g group 'if pgrep master >/dev/null ; then echo RESTART; /etc/init.d/postfix restart; fi'
# httpd
for srv in $(cat server.list); do echo -en "$srv \t- "; ssh $srv "httpd -k restart" ; done
silviuvulcan / gist:e9d5838a81f5ba8de850
Created Aug 19, 2014
convert pdf to greyscale on the command line
View gist:e9d5838a81f5ba8de850
gs \
-sOutputFile=output.pdf \
-sDEVICE=pdfwrite \
-sColorConversionStrategy=Gray \
-dProcessColorModel=/DeviceGray \
-dCompatibilityLevel=1.4 \
silviuvulcan /
Created Aug 19, 2014
Nokia N800 mplayer settings
mplayer -lavdopts lowres=1 <videofile>
mplayer quiet-file -af volume=10
In short, this is what I did to get my N800 to boot OS2008 from MMC. My steps were:
1) upgraded my N800 to OS2008,
2) enabled the Maemo Extras repository in Application Manager and added, Distribution: (blank) Components: free non-free
3) installed openssh using Application Manager
4) defined a root password (openssh's installer prompted for this)
5) opened xterm and:
# ssh root@localhost
# visudo
silviuvulcan /
Created Aug 19, 2014
script screen to create multiple windows
screen -dmS servers -T xterm -t "http" sh -c 'cd /servers/start/httpo;'
screen -T xterm -S "servers" -X screen screen -t "sql" sh -c 'cd /servers/start/sql;'
# The "-T xterm" switch isn't really necessary, unless you plan to use curses-based programs from inside the screen (mc, less, etc.).
silviuvulcan /
Last active Aug 29, 2015
Convert pfx certificate for apache usage
openssl pkcs12 -in -clcerts -nokeys -out
openssl pkcs12 -in -nocerts -nodes -out
openssl rsa -in -out
openssl pkcs12 -in -nodes -nokeys -cacerts -out
View screen-statusbar
hardstatus alwayslastline
# hostname / time /date / load / screens
#hardstatus string "%{b kw}%H %{r}%1` %{w}| %{g}%c %{w}| %{y}%d.%m.%Y %{w}| %{g}%l %{w}| %{-b kw}%u %-Lw%{= rW}%50> %n%f %t %{-}%+Lw%<"
# hostname screens load date time
#hardstatus string '%{= kw}[ %{= kb}%H%{= kw} ][%= %{= kw}%?%-Lw%?%{= kW}%n*%f %t%?%?%{= kw}%?%+Lw%?%?%= ][ %{r}%l%{w} ]%{w}[%{r} %d/%m/%y %C %A %{w}]%{w}'
# combination of the above (with the nicer screen list)
hardstatus string '%{= kw}[ %{= kb}%H%{= kw} ][ %= %{-b kw}%u %-Lw%{= rW}%50> %n%f %t %{-}%+Lw %= ][ %{r}%l%{w} ]%{w}[%{r} %d/%m/%y %C %A %{w}]%{w}'
You can’t perform that action at this time.