Skip to content

Instantly share code, notes, and snippets.

# How to install `ipkg` on a Synology DS214
After a couple of days of trying to get `ipkg` woking on my DS214 I found [this article](https://github.com/trepmag/ds213j-optware-bootstrap) by [trepmag](https://github.com/trepmag). It is written for the DS213j, but it’s been working for me and [others](https://github.com/alberthild) for the DS214 too.
I have done some minor changed to clarify some things, but if you are a Linux guy (unlike me) my changes might be of no use to you.
## Guide
sudo apt-get purge $(dpkg --list|grep linux-image|grep --invert $(uname -r)|grep --invert 'linux-image-generic'|awk -F ' ' '{print $2}');sudo apt-get autoremove;sudo update-grub2;
osboxes@osboxes:/var/log/upstart$ uname -a
Linux osboxes 4.4.6-040406-generic #201603161231 SMP Wed Mar 16 16:59:04 UTC 2016 i686 i686 i686 GNU/Linux
osboxes@osboxes:/dev$ sudo apt-get update
[sudo] password for osboxes:
已有:1 http://archive.ubuntu.com/ubuntu xenial InRelease
已有:2 http://security.ubuntu.com/ubuntu xenial-security InRelease
已有:3 http://archive.canonical.com/ubuntu xenial InRelease
下載:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [94.5 kB]
已有:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
下載:6 http://archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [132 kB]
@sporting
sporting / gist:c3e3f2a344541059853c
Created March 18, 2016 07:13
install package control on sublime text 3
import urllib.request,os;pf = 'Package Control.sublime-package';ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) );open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())
@sporting
sporting / gist:941c91d78f47f401f356
Created March 18, 2016 07:11
install package control on sublime text 2
import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
@sporting
sporting / gist:eb9b7625c272b383bc3b
Created March 17, 2016 08:57
using Javascript regular expression to split
key="123 456 777777 32432 531 431431 531453 5315312 4312341 fdkljas asdkj 314 fdaslj 431lj"
var result = key.split(/(\w+\s\w+\s\w+\s\w+\s\w+\s)/gi)
for (var item in result){
console.log(result[item])
}