Posts

Showing posts from April, 2015

Create a custom tool for p4v to spawn Rubymine on a directory straight out of p4v

Create a new script: mkdir -p ~/bin/generic/run-rubymine-as-a-tool.sh vim ~/bin/generic/run-rubymine-as-a-tool.sh #!/bin/bash if echo "${1}" | grep -q '...$'; then   DIR="`dirname ${1}`" else   DIR=${1} fi exec ${HOME}/bin/RubyMine/bin/rubymine.sh "${DIR}" chmod 0754  ~/bin/generic/run-rubymine-as-a-tool.sh Under p4v: Tools -> Manage Custom Tools -> New Tool Name: Rubymine Select: Add to application context menus Application: ~/bin/generic/run-rubymine-as-a-tool.sh Arguments: %d

Fedora 21 ntpd restart problems after boot

This seems to finally have got it working across boots sudoedit /usr/lib/systemd/system/ntpd.service [Unit] Description=Network Time Service After=syslog.target ntpdate.service sntp.service multi-user.target network.target sshd.service Conflicts=systemd-timesyncd.service [Service] Type=forking EnvironmentFile=-/etc/sysconfig/ntpd ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS PrivateTmp=true [Install] #WantedBy=multi-user.target WantedBy=default.target sudoedit /etc/systemd/system/ntpd.service.d/restart.conf [Service] Restart=always RestartSec=17 sudo systemctl daemon-reload sudo systemctl restart ntpd.service Update: still a problem finally googled right, it is %#(%^&(#^ service called chrony.

Rotating the linux console with Intel HD graphics

I've never gotten this to work with Nvidia cards, but with my mac mini with Intel Iris graphics, you can: /bin/echo "3" > /sys/devices/virtual/graphics/fbcon/rotate To rotate the display counter-clockwise 90 degrees, which is very helpful if you are trying to restore a system with monitors in portrait mode.

Changing the file descriptor of a running process

Found this today: http://ingvar.blog.redpill-linpro.com/2010/07/10/changing-a-process-file-descriptor-on-the-fly/ pretty cool. #!/bin/bash # # Swap/Roll a logfile # # Usage: <old logfile> <new logfile> [ optional pids ] # ./swap.sh /var/log/logfile /tmp/logfile [pids] # # Author: Robert McKay <rob...@mckay.com> # Date: Tue Aug 14 13:36:35 BST 2007 # # Update: Added usage message when needed, a fuser format fix, # some whitespace cleanup, and a localization fix. # Ingvar Hagelund <ingvar@redpill-linpro.com> # Date: Sat Jul 10 02:11:49 CEST 2010 if [ "$2" = "" ]; then echo "Usage: $0 /path/to/oldfile /path/to/newfile [pids] Example: $0 /var/log/somedaemon.log /var/log/newvolume/somedaemon.log 1234 Example: $0 /dev/pts/53 /dev/null 1234 " exit 0 fi if gdb --version > /dev/null 2>&1; then true else echo "Unable to find gdb." exit 1 fi src=$1 dst=$2

Failure at installing Fedora 20 on a mac mini

This was an attempt to put Fedora 20 on a 2008-ish mac mini. Even though this box has a 64-bit processor, it has 32-bit EFI.  Fedora installers come in 1 of 2 configurations: 64-bit EFI / x86_64 32-bit Bios /  i686 Rather than go through the rigmarole of wrapping my own 32bit EFI with x86_x64, I went with the easy approach of 32-bit Bios + i686.  The box only has 2GB of RAM, so I am not really missing out on anything. I've grown quite accustomed to XFCE so I downloaded the i686 spin: http://download.fedoraproject.org/pub/fedora/linux/releases/20/Live/i386/Fedora-Live-Xfce-i686-20-1.iso Download and installed base system Post installation configuration: systemctl enable sshd.service systemctl start sshd.service yum -y update yum -y install vim-enhanced yum -y install yum-plugin-keys yum-plugin-fastestmirror yum-plugin-remove-with-leaves yum-plugin-show-leaves yum-plugin-verify yum  -y install xfce4-cpufreq-plugin xfce4-icon-theme xfce4-volumed xfce-theme-manager xfwm