I could not get the cygwin version YouCompleteMe to work on either my work machine or home machine. Resorted to MS.
1. Make sure the python used/installed is the same 32/64 bit as Gvim.
Use
:version
to check version.
Do
:python print("something")
to check that it works.
YouCompleteMe reccommends 64bit, but I got it working using 32.
2. Install the latest Community Visual studio
3. Install the latest MS Build Tools.
4. Follow the commands from the YouCompleteMe page under the windows section.
5. I used the command window from the VS menu options. This sets up the variables. Remember to 32/64 as necessary.
.vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-git'
" plugin from http://vim-scripts.org/vim/scripts.html
Plugin 'L9'
" Git plugin not hosted on GitHub
"Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
"Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
"Plugin 'ascenator/L9', {'name': 'newL9'}
Plugin 'chriskempson/base16-vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'scrooloose/syntastic'
Plugin 'majutsushi/tagbar'
Plugin 'sheerun/vim-polyglot'
Plugin 'SirVer/ultisnips'
Plugin 'tpope/vim-sensible'
Plugin 'honza/vim-snippets'
Plugin 'yegappan/mru'
Plugin 'vim-airline/vim-airline'
Plugin 'craigemery/vim-autotag'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
set backupdir=~/.vim/backup_files//
set directory=~/.vim/swap_files//
Sunday, December 11, 2016
Sunday, February 7, 2016
Upgrade to digikam 4.20
A lot of search results said that removing kipi-plugins would do the trick.
I ended up having to do this:
1. remove digikam completely
2. point at this repository:
sudo add-apt-repository ppa:philip5/extra
sudo apt-get update
3. the reinstall digikam.
I ended up having to do this:
1. remove digikam completely
2. point at this repository:
sudo add-apt-repository ppa:philip5/extra
sudo apt-get update
3. the reinstall digikam.
Saturday, October 17, 2015
Autofs on ubuntu working
Finally got autofs on ubuntu 14 working
1. Install autofs
2. Add this entry to /etc/auto.master
/media/azure /etc/auto.azure
3. Add following to /etc/auto.azure
Multimedia -fstype=fuse,nonempty,rw,allow_other,uid=1000,gid=1000 :sshfs\#admin\
@192.168.2.4\:/share/MD1_DATA/Multimedia
Multimedia2 -fstype=fuse,nonempty,rw,allow_other,uid=1000,gid=1000 :sshfs\#admin
\@192.168.2.4\:/share/MD0_DATA/Multimedia2
#Multimedia -fstype=fuse,rw :sshfs\#admin\@azure\:/share/MD0_DATA/Multimedia
4. Turn on Browsing in /etc/default/autofs
5. Stop the automount service
service automount stop
6. Use (as root)
automount -d -f -v
to debug the problems/
1. Install autofs
2. Add this entry to /etc/auto.master
/media/azure /etc/auto.azure
3. Add following to /etc/auto.azure
Multimedia -fstype=fuse,nonempty,rw,allow_other,uid=1000,gid=1000 :sshfs\#admin\
@192.168.2.4\:/share/MD1_DATA/Multimedia
Multimedia2 -fstype=fuse,nonempty,rw,allow_other,uid=1000,gid=1000 :sshfs\#admin
\@192.168.2.4\:/share/MD0_DATA/Multimedia2
#Multimedia -fstype=fuse,rw :sshfs\#admin\@azure\:/share/MD0_DATA/Multimedia
4. Turn on Browsing in /etc/default/autofs
5. Stop the automount service
service automount stop
6. Use (as root)
automount -d -f -v
to debug the problems/
Sunday, October 4, 2015
Going Full LINUX
This is more of a note for myself, but it may be useful for others.
My MacBook is dead - well, not quite, but there are signs that the logic board is going - and my father gave me a Toshiba laptop (more of ChromeBook) clone, but still useful with Windows 8 on it, plus a native USB3 port.
Firstly, I installed Ubuntu latest and greatest. This was relatively easy - usual problems with burning CDs - but it was set up in a trice, and connected via WiFi. This proved problematic because of the position of my laptop in the house, so I connected it to the router via a TP-Link power line adaptor.
Secondly, I have three NAS storage books on a subnet. This was relatively straight-forward on the Mac with Internet Sharing, but I had no such luxury with Ubuntu. Neither do I know much about networking. I did some google searching.
I took the following steps:
1. Connected my network switch to the laptop via USB3 ethernet adapter. This gave me "eth1", "eth0" being connected to the powerline adapter.
2. Enabled IP forwarding
1.1 added this line
net.ipv4.ip_forward=1
to
/etc/sysctl.conf
then did this:
/etc/init.d/procps restart
3. Installed dhcp3
4. Added the static ip address to eth1 via ip addr
Set back and waited, and nothing happened. zenmap gave me nothing, ifconfig showed me the IP address was attached to the NIC, and, sometimes, the Ubuntu server interface showed the servers I was trying to connect to. Mysteriously, eth1 would lose the ip address I'd assigned it so finally, I gave eth1 a static address via the Ubuntu network tools.
I went through some iptables stuff:
iptables -A FORWARD -o eth0 -i eth1 -s 192.168.2.0/24 -m conntrack --ctstate NEW
-j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Which would help later but nothing happened immediately.
I also added
and packets started flooded to the internet and back.
My QNAP NAS box surprised me by streaming out packets on 6881. Apparently that's "good for the community".
A lot of my pictures were on a USB3 connected external box, but as they had been attached to the Mac, they were formatted in HFS+. The Ubuntu tool hfsprogs is handy. I used the following command to mount the patition:
mount -t hfsplus -o force,rw /dev/sdc2 /media/roger/Pictures/
Whether this (or any of the other steps) survive a reboot of my machine is a moot point. Another adventure!
My MacBook is dead - well, not quite, but there are signs that the logic board is going - and my father gave me a Toshiba laptop (more of ChromeBook) clone, but still useful with Windows 8 on it, plus a native USB3 port.
Firstly, I installed Ubuntu latest and greatest. This was relatively easy - usual problems with burning CDs - but it was set up in a trice, and connected via WiFi. This proved problematic because of the position of my laptop in the house, so I connected it to the router via a TP-Link power line adaptor.
Secondly, I have three NAS storage books on a subnet. This was relatively straight-forward on the Mac with Internet Sharing, but I had no such luxury with Ubuntu. Neither do I know much about networking. I did some google searching.
I took the following steps:
1. Connected my network switch to the laptop via USB3 ethernet adapter. This gave me "eth1", "eth0" being connected to the powerline adapter.
2. Enabled IP forwarding
1.1 added this line
net.ipv4.ip_forward=1
to
/etc/sysctl.conf
then did this:
/etc/init.d/procps restart
3. Installed dhcp3
4. Added the static ip address to eth1 via ip addr
Set back and waited, and nothing happened. zenmap gave me nothing, ifconfig showed me the IP address was attached to the NIC, and, sometimes, the Ubuntu server interface showed the servers I was trying to connect to. Mysteriously, eth1 would lose the ip address I'd assigned it so finally, I gave eth1 a static address via the Ubuntu network tools.
I went through some iptables stuff:
iptables -A FORWARD -o eth0 -i eth1 -s 192.168.2.0/24 -m conntrack --ctstate NEW
-j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Which would help later but nothing happened immediately.
I also added
# eth1 subnet configuration
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.1 192.168.2.99;
option routers 192.168.2.1;
option broadcast-address 192.168.2.255;
}
to /etc/dhcp/dhcp.conf
I tried wireshark, but I did not have the patience to work out what was going on. In particular, it told me that I had to run as a normal user when only running it as root gave me "access" to the right interfaces. Anyway, after flailing around some more on google I found this to be helpful
tcpdump -i eth1
which showed me that various MAC addresses were trying to connect to eth1 but the message "oui unknown" was the response.
Eventually, I restarted
/etc/init.d/isc-dhcp-server restart
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.1 192.168.2.99;
option routers 192.168.2.1;
option broadcast-address 192.168.2.255;
}
to /etc/dhcp/dhcp.conf
I tried wireshark, but I did not have the patience to work out what was going on. In particular, it told me that I had to run as a normal user when only running it as root gave me "access" to the right interfaces. Anyway, after flailing around some more on google I found this to be helpful
tcpdump -i eth1
which showed me that various MAC addresses were trying to connect to eth1 but the message "oui unknown" was the response.
Eventually, I restarted
/etc/init.d/isc-dhcp-server restart
and packets started flooded to the internet and back.
My QNAP NAS box surprised me by streaming out packets on 6881. Apparently that's "good for the community".
A lot of my pictures were on a USB3 connected external box, but as they had been attached to the Mac, they were formatted in HFS+. The Ubuntu tool hfsprogs is handy. I used the following command to mount the patition:
mount -t hfsplus -o force,rw /dev/sdc2 /media/roger/Pictures/
Whether this (or any of the other steps) survive a reboot of my machine is a moot point. Another adventure!
Saturday, August 1, 2015
Compiling GNU tools on QNAP box - busybox linux
1. Use the ipkg utility to install the following - not exhaustive - list
gcc and sed are the important ones - without those, configure won't run
2. Set the LD_LIBRARY_PATH to /opt/lib
3. Set C_INCLUDE_PATH/CPLUS_INCLUDE_PATH to /opt/include
3. run configure, make and install in the usual way.
- gcc
- sed
- pcre
- pcre-dev
- gmp
- optware-devel
gcc and sed are the important ones - without those, configure won't run
2. Set the LD_LIBRARY_PATH to /opt/lib
3. Set C_INCLUDE_PATH/CPLUS_INCLUDE_PATH to /opt/include
3. run configure, make and install in the usual way.
Sunday, December 15, 2013
Peter O'Toole, RIP
I liked Peter O'Toole, star and actor. He made great films.
One of his quotes has been doing the rounds:
Born in County Galway in 1932, O’Toole wrote in a notebook as a boy: “I will not be a common man. I will stir the smooth sands of monotony.”
http://www.independent.co.uk/news/people/news/a-hero-and-a-hellraiser-film-and-theatre-icon-peter-otoole-dies-at-81-9006273.html
Initially I took this at face value and assumed that O'Toole had written it. However Lee Randall pointed out that it was a quote, and led me me to an interview by O'Toole with Talese in 63:
“I do not choose to be a common man…it is my right to be uncommon—if I can…I seek opportunity—not security…I want to take the calculated risk; to dream and to build, to fail and to succeed… to refuse to barter incentive for a dole… I prefer the challenges of life to the guaranteed existence, the thrill of fulfillment to the stale calm of utopias….”
http://longform.org/stories/peter-o-toole-on-the-ould-sod
So the later quote is an addition, obviously, the Lawrence of Arabia meme played heavily in O'Toole's life. I suspect he may have been trapped by it, and somewhat like Orson Welles, he played his career in reverse.
But where does the original quote come from? Searching Google for the O'Toole augmentation only comes up with O'Toole. Instead, I searched for some words in the second half of the Talese quote, and came up with a poem by Dean Alfrange:
http://www.goodreads.com/quotes/82410-my-creed-i-do-not-choose-to-be-a-common
One of his quotes has been doing the rounds:
Born in County Galway in 1932, O’Toole wrote in a notebook as a boy: “I will not be a common man. I will stir the smooth sands of monotony.”
http://www.independent.co.uk/news/people/news/a-hero-and-a-hellraiser-film-and-theatre-icon-peter-otoole-dies-at-81-9006273.html
Initially I took this at face value and assumed that O'Toole had written it. However Lee Randall pointed out that it was a quote, and led me me to an interview by O'Toole with Talese in 63:
“I do not choose to be a common man…it is my right to be uncommon—if I can…I seek opportunity—not security…I want to take the calculated risk; to dream and to build, to fail and to succeed… to refuse to barter incentive for a dole… I prefer the challenges of life to the guaranteed existence, the thrill of fulfillment to the stale calm of utopias….”
http://longform.org/stories/peter-o-toole-on-the-ould-sod
So the later quote is an addition, obviously, the Lawrence of Arabia meme played heavily in O'Toole's life. I suspect he may have been trapped by it, and somewhat like Orson Welles, he played his career in reverse.
But where does the original quote come from? Searching Google for the O'Toole augmentation only comes up with O'Toole. Instead, I searched for some words in the second half of the Talese quote, and came up with a poem by Dean Alfrange:
http://www.goodreads.com/quotes/82410-my-creed-i-do-not-choose-to-be-a-common
Get quotes daily
Dean Alfange > Quotes > Quotable Quote
“My Creed
I do not choose to be a common man,
It is my right to be uncommon … if I can,
I seek opportunity … not security.
I do not wish to be a kept citizen.
Humbled and dulled by having the
State look after me.
I want to take the calculated risk;
To dream and to build.
To fail and to succeed.
I refuse to barter incentive for a dole;
I prefer the challenges of life
To the guaranteed existence;
The thrill of fulfilment
To the stale calm of Utopia.
I will not trade freedom for beneficence
Nor my dignity for a handout
I will never cower before any master
Nor bend to any threat.
It is my heritage to stand erect.
Proud and unafraid;
To think and act for myself,
To enjoy the benefit of my creations
And to face the world boldly and say:
This, with God’s help, I have done
All this is what it means
To be an Entrepreneur.”
I do not choose to be a common man,
It is my right to be uncommon … if I can,
I seek opportunity … not security.
I do not wish to be a kept citizen.
Humbled and dulled by having the
State look after me.
I want to take the calculated risk;
To dream and to build.
To fail and to succeed.
I refuse to barter incentive for a dole;
I prefer the challenges of life
To the guaranteed existence;
The thrill of fulfilment
To the stale calm of Utopia.
I will not trade freedom for beneficence
Nor my dignity for a handout
I will never cower before any master
Nor bend to any threat.
It is my heritage to stand erect.
Proud and unafraid;
To think and act for myself,
To enjoy the benefit of my creations
And to face the world boldly and say:
This, with God’s help, I have done
All this is what it means
To be an Entrepreneur.”
Bingo.
One question remains. How did Peter O'Toole, an itinerant worker in Leeds at the time, come to know about this piece? Dean Alfrange's wikipedia entry is interesting.
His poem, "My Creed" appears in the Reader's Digest, 1952 and 1954. I like to think that somewhere in Leeds, 1952, a young go-getter of Irish extraction, a Billy Liar figure, read those words and, eventually, went for it.
Sunday, February 17, 2013
Mind-dump about the horse-meat crisis
The problem, to me, isn't Labour, Tories or LibDems per se.
Rather, it's the Randian neo-liberalism - itself a worm from the Free
Trade nonsense of the 19th Century - that's the cause of our problems.
The idea that we would be better off if business had completely
free-hand.
I'm not anti-business - I'd like to rent a studio for my music but it's usually too expensive - however I can see a level of enforcement is necessary. Bacteria like a really open free-market; people cut corners, and I can see no recourse but to apply the law. If as a consumer I'm faced with a wife or a daughter or son who's been poisoned by a negligently made product, my only recourse is to stop buying from that source? What a great punishment for someone who's defrauded me, and killed my kith and kin. As in everyday life, people who defraud others should be punished.
As it stands, we still have plenty of regulations - stack-loads - but our over-lords, in an attempt to be business-friendly, and to make it appear as if they have an economic policy that works, refuse to enforce most of them until a crisis like this arises.
The same thing happened with the 2008 crash. Mervyn King falling asleep in the Financial Stability Committee meetings is emblematic of a heap load of farragoes past and present. Until the virulent strain of neo-liberalism that infects all parties has worked itself out, we'll be continuously faced with such situations as the horse-meat problem.
I'm not anti-business - I'd like to rent a studio for my music but it's usually too expensive - however I can see a level of enforcement is necessary. Bacteria like a really open free-market; people cut corners, and I can see no recourse but to apply the law. If as a consumer I'm faced with a wife or a daughter or son who's been poisoned by a negligently made product, my only recourse is to stop buying from that source? What a great punishment for someone who's defrauded me, and killed my kith and kin. As in everyday life, people who defraud others should be punished.
As it stands, we still have plenty of regulations - stack-loads - but our over-lords, in an attempt to be business-friendly, and to make it appear as if they have an economic policy that works, refuse to enforce most of them until a crisis like this arises.
The same thing happened with the 2008 crash. Mervyn King falling asleep in the Financial Stability Committee meetings is emblematic of a heap load of farragoes past and present. Until the virulent strain of neo-liberalism that infects all parties has worked itself out, we'll be continuously faced with such situations as the horse-meat problem.
Subscribe to:
Posts (Atom)