teleren/devto huggingface dataset:
Awesome Umbraco
Tags: umbraco
Published: 2020-08-13 17:22:49

---
title: Awesome Umbraco
description: A collection of awesome Umbraco 7 packages, resources and shiny things.
published: true
date: 2015-05-01 00:00:00 UTC
tags: umbraco
canonical_url: https://mozzy.dev/posts/awesome-umbraco/
---

Many of you are probably aware that one of the great things about Umbraco is the fact that it is easily extendable and can be used for all sorts of flexible solutions. This is mostly down to the community and the people who are constantly building upon a solid foundation.

It would be a shame for all this great work to go unnoticed and so [Lee Kelleher](https://twitter.com/leekelleher) has created a repository that showcases some of these packages and groups them into their use.

> A collection of awesome Umbraco 7 packages, resources and shiny things.

### Next steps

Check out the [Github repo](https://github.com/leekelleher/awesome-umbraco) and add some packages to the list!
RDBMS vs NoSQL
Tags: database
Published: 2020-10-05 11:34:08

---
title: RDBMS vs NoSQL
published: true
date: 2015-04-28 00:00:00 UTC
tags: Database
canonical_url: 
---

Learn about RDBMS and NoSQL Database systems, their differences, benefits and limitations

   
[Read On](https://www.loginradius.com/engineering/blog/relational-database-management-system-rdbms-vs-nosql/)
MySQL Users & Permissions
Tags: mysql, sql
Published: 2021-03-05 22:46:15

---
title: MySQL Users & Permissions
published: true
date: 2015-04-27 00:00:00 UTC
tags:
  - mysql
  - sql
canonical_url: https://www.emmanuelgautier.com/blog/mysql-users-permissions/
---

Database administration includes users and permissions management. Most of the time, a UI like, [MySQL Workbench](https://www.mysql.fr/products/workbench/) or [PHPMyAdmin](https://www.phpmyadmin.net/), is available to perform users management actions. Here, we will see how to do some MySQL users and permissions management with SQL queries.

### User creation

First action, user creation with a password. Two ways to perform this action depending on the way you want to pass the password.

```sql
-- Not hashed password in the query (not very secure)
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';

-- With hashed password
SELECT PASSWORD('password'); -- Création du Hash du mot de passe
CREATE USER 'user'@'localhost' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB9900DFG1E6Y89F4';
```

### User renaming

Now, let's see how to rename an already created user with the following query.

```sql
RENAME USER 'user'@'localhost' TO 'user2'@'localhost';
```
Weakest Database Design
Published: 2022-09-26 20:15:31

---
title: Weakest Database Design
published: true
date: 2015-04-21 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2015/weakest-database-design/
---

I have been recently working on a database that hasn’t been designed but has been hacked together by lots of people over the years.

It started life as an Microsoft Access database created by my director to keep track of all the projects that our company does. It was not much more than one table listing everything. At some point the data and frontend was split with the data being stored in SQL Server and the front end being an Microsoft Access ADP.

Over the years more and more columns have been added to this table that it long ago became pretty much unmanageable. A few normalized tables exist but for the most part everything is stored in this one table which makes querying it very difficult. At the last count there were 81 columns in this one database table.

Attempts to improve this database have been tried before but due to the fact that the whole company basically runs off this database and no one person knows everything that the database needs to do causes any changes to be very difficult. I suspect it may be beyond my abilities but I am going to give it a go.

One advantage I have is version control. All the tables and the structure is in version control, so when I break things I can roll them back. Any changes to the front end are also in source control, these are harder to roll back in case of problems but not impossible.

I have met with department heads to try and establish which of the 81 columns are being used and which could be dropped. Database design shouldn’t be a democracy, your databases should be designed in a way to store your data most efficiently. In this case it felt a bit like the database was playing “the weakest link” with everyone voting off unpopular columns. “You are the weakest database column. Goodbye!” After much discussion I have over 30 columns that can be dropped and 10 or so that require further investigation.

Using the Visual Studio project of the database, I removed the columns. This generated thousands of errors as most columns are included in loads of views and stored procedures. All these references need removing, so not a small job. This is made worse by the fact that the views and stored procedures are in a mess, and it is very hard to read the T-SQL code and see what is doing what. Part of my next job is going to be tidying up all these queries so I can see what’s what.

The advantage of using the Visual Studio project to do these changes is that I can generate a SQL script of the changes and I can rerun a few times and test restoring different columns as it is unlikely to be a smooth deployment.
Cloud storage vs Traditional storage
Tags: cloud, storage
Published: 2020-10-05 11:34:15

---
title: Cloud storage vs Traditional storage
published: true
date: 2015-04-21 00:00:00 UTC
tags: Cloud,Storage
canonical_url: 
---

With Information Technology becoming more and more Cloud based nowadays (due to industry demanding reliability and scalability in their infrastructure), the Cloud storage system has become a very feasible solution. Various organizations are migrating their data to cloud storage…

   
[Read On](https://www.loginradius.com/engineering/blog/cloud-storage-vs-traditional-storage/)
The Raspberry Pi Adventure Starts
Published: 2022-09-26 20:16:11

---
title: The Raspberry Pi Adventure Starts
published: true
date: 2015-04-11 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2015/the-raspberry-pi-adventure-starts/
---

I am currently buzzing with excitement about my Raspberry Pi. I will try to document here what I have done so far.

I decided to buy the camera module along with my Pi. It was straightforward to connect them up, lift the connector behind the network port, insert the ribbon cable, push connector back down.

Next I connected up Keyboard, Mouse, Monitor, SD Card and Power. And my Pi had life.

I was then given a screen full of options to install, Pidora is an OS which is based on Fedora which I have some experience of so I went with that one.

After that was installed I was presented with a standard desktop with various programs installed.

So far I had not plugged in a network cable because that would mean sitting in the hall next to the router, I thought before I do that lets see if wifi will work. I have a usb wifi adapter that I use with my PC, so I plugged that in.

Nothing happened, having some experience of linux I wasn’t surprised. I went to network connections filled in the name of my wifi connection and its password and it connected. WOW! That was easy.

So I then installed [webmin](http://www.webmin.com/download.html) so I could remotely administer it and updated it with YUM. I also started the SSH service so I can use putty to login to my Pi from the comfort of my laptop. Even better than that I found a SSH client for my smart phone so I can even control my Pi from my phone!

EDIT: I forgot that in order to get webmin to work I needed to do the following.

mv /etc/redhat-release /etc/redhat-release.bak echo “Fedora release 20 (Heisenbug)” > /etc/redhat-release

OK So now I am able to configure settings on my Pi from a browser or use SSH (Secure SHell) to login to run any command I like.

Now lets lookup how to use the camera. The [documentation](https://www.raspberrypi.org/documentation/configuration/camera.md) says that the camera first needs enabling using the command raspi-config. This command doesn’t exist in Pidora. Lets skip it and see if it works anyway. It does! The command raspistill -v -o test.jpg took a picture of my ceiling.

Now how do I look at this picture remotely. SSH is a command line only interface, so I can see a 2Mb file has been created. How about installing a web server on my Pi?

yum install httpd

This install apache which is the default (and very popular) web server.

service httpd start

This starts the web server. Going to http://[IP] where [IP] is the ip address of your raspberry pi will show you the default apache page.

Now if you run raspistill -v -o /var/www/html/image1.jpg it will create your photo on the web server.

Not bad for my first steps, the command above could be scheduled and images taken every hour. There is also options for recording video.
REST vs. RPC and a mention of HATEOS
Tags: rest, rpc, hateos, api
Published: 2018-09-25 03:20:09

---
title: REST vs. RPC and a mention of HATEOS
published: true
tags: REST,RPC,HATEOS,API
canonical_url: http://designfrontier.net/rest-vs-rpc-vs-hateos
---

This is a modified and expanded version of an email I sent a few days ago, here for public consumption.

So RPC is great, right? I need to do X to my data so I’ll just make an endpoint called /doX and hit it and bam the API did X! It’s just so simple! Except that it is the same as saying that you will only ever want to do X with your data. The only way to create a full featured RPC api is to be omniscient. RPC APIs are like saying: “These are the only things that you can do to this data, and nothing else. Only these things.”

REST APIs describe the data itself. They aren’t about you can do X with the data. If you want to do X to the data then you do X and then send it to the API for persistence. REST is a persistence layer for data rather then an API for doing things to the data. If you have seen The Lego Movie then you can think of REST APIs as the master builder API. While RPC is the “awesome” API (The Instruction booklet or maybe even [kraggle](http://biffbampop.files.wordpress.com/2014/02/lego-kraggle.jpg)…). If you haven’t seen the Lego Movie… go watch it!

REST says “hey! here are the building blocks, build stuff with them!” instead of “here is what you can build with these building blocks”. This flexibility is the key to future development. It allows you to build a system that provides flexibility for doing things with the data that you haven’t anticipated.

HATEOS is REST on steroids (some people will tell you there is no REST without HATEOS... I disagree. They have different acronyms. HATEOS is a superset of REST that maybe doesn’t always make sense). But it shares with REST the idea that it is a persistence layer and not a series of function calls over http (or whatever protocol you use).

The beauty of a good RESTful API is that it doesn’t tell you what you can build. Need to send an email? POST it to the /email end point. Want to view an email that is in the queue or one you sent earlier? GET it from /email/this-email-id-thing. No need for a /sendEmail RPC style endpoint. Because like all queues, we are just talking about a collection of objects, or an array.

Hopefully this helps make things clearer... The benefit to you is lower maintenance costs because of the simplicity of the system. Your users will get flexibility to build awesome stuff that creatively uses your data. Yes it puts a larger burden on the individual consuming applications, but that is a minor cost and one that is well worth it.
mac版のIntelliJ IDEA + IdeaVimで^[が効かない
Tags: mac, intellij
Published: 2015-04-09 09:50:00

---
title: mac版のIntelliJ IDEA + IdeaVimで^[が効かない
published: true
tags: Mac, IntelliJ
date: 20150409T09:50Z
canonical_url: https://qiita.com/shiena/items/0b82b242e32f4e4d02c0
---
# 原因

キーボードがJIS配列でもUS配列として認識されてしまうため、`[`の位置のキーを`]`と認識されています。

# 解決方法

## 機械に合わせる

US配列の`[`の位置のキーを押せばよいので、JIS配列では`^@`を入力します。

## 機械を合わせる

### v0.33以降

IdeaVIM v0.33からキーの割り当て方法が変わり、次のいずれかのファイルにキーマップを設定します。
更にv0.35から`~/.vimrc`と`~/_vimrc`は使われなくなりました。

* `~/.ideavimrc`
* `~/_ideavimrc`
* ~~`~/.vimrc`~~
* ~~`~/_vimrc`~~

macのJIS配列キーボードは`¥`で円記号、`Option+¥`でバックスラッシュが入力されて不便なので、ついでに入れ替えてしまいます。

```vim:~/.ideavimrc
inoremap <c-]> <esc>
inoremap ¥ \
inoremap \ ¥
```

参考ページ

* [IdeaVIM v0.33がリリースされました](http://d.hatena.ne.jp/masanobuimai/20140429/1398758972)
* [IdeaVIMがmapコマンドによるモード別キーマップに対応した](http://www.karakaram.com/ideavim-map-supported)

### v0.33未満

`Settings -> Keymap -> Editor Actions -> Escape`に`^[`を割り当てます。
UFW, Ubuntu, OpenVPN, and Docker
Tags: docker, ufw, openvpn, iptables
Published: 2015-04-06 20:35:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: UFW, Ubuntu, OpenVPN, and Docker
slug: ufw-ubuntu-openvpn-and-docker
date: 2015-04-06 20:35
tags:
 - docker
 - ufw
 - openvpn
 - iptables
---

Today I've been playing with UFW, Ubuntu, OpenVPN, and Docker. A few other things as well but this post relates to those technologies, mainly UFW, Ubuntu, and Docker.

In case you didn't know, like I didn't know, when you expose ports, Docker thinks a great idea would be to put some rules into iptables to allow the traffic to pass through. I'm sure there is a good reason for this, but you may find that when you enable UFW, traffic still gets through. Now that I understand what is going on, it all makes sense, but getting to that point has taken up my evening.

I followed this tutorial on [how To Run OpenVPN in a Docker Container on Ubuntu 14.04](https://www.digitalocean.com/community/tutorials/how-to-run-openvpn-in-a-docker-container-on-ubuntu-14-04) which was a breeze. Really highlighted the strengths of Docker. This setup assigns you an IP from 192.168.255.0/24.

My next step, now that I had VPN access, was to shut down eth0 on the machine, allowing through only ports 22 & 1194/udp. What I didn't know was that Docker was going to be a royal pain in the arse during this time. It would continue to bypass my rules and make me wonder what the hell was wrong with UFW. Nothing was, it was Docker playing with iptables.

To stop Docker from doing this, you have to start the Docker daemon, or Docker engine I think it's now called, with the --iptables=false flag. To do this, on Ubuntu 14.04, open up `/etc/default/docker` in your favourite text editor and add the following line:

    DOCKER_OPTS="--iptables=false"
    
Save that, and then restart the Docker daemon/engine/server thing:

    sudo restart docker
    
Now, I'm not sure what happens here with existing containers, but I went ahead and deleted them and started fresh. Now when you start new containers, there won't be crazy rules bypassing UFW.

For UFW, I had to add a few rules. I added in ports 22 (SSH) and 1194/udp (VPN). I also added a rule to allow all traffic from docker0:

    sudo ufw allow 22
    sudo ufw allow 1194/udp
    sudo ufw allow in on docker0 to any
    sudo ufw enable
    
Next, I started some containers, and tried to access them. No access... turned on the VPN, tried again, and bingo. I had access. It took a while to get there but I got there. Secured access to my containers.

Now I need a long, hot bath to relax. Thanks a lot Docker!
BloggerCMS  - An Static Blog Generator CMS
Published: 2020-01-28 09:44:24

---
title: BloggerCMS  - An Static Blog Generator CMS
published: true
tags: 
canonical_url: 
---

In the [last post](https://codeinphp.github.io/post/welcome.html), I had mentioned about BloggerCMS which is used to build this very blog. BloggerCMS is dead simple CMS that can be used to create fully functional static blogs. Although there are [quite some static site generators](https://github.com/pinceladasdaweb/Static-Site-Generators#php) out there but I created BloggerCMS because I was missing these features in any of those static site generators:

- Web interface that allows me to create blog posts, add pages and more instead of writing blog posts manually in bunch of different text files
- Markdown editor with live preview feature so that I don't have to type Markdown syntax myself
- I needed a true blog generator instead of generic/advanced site generator

Those three things are the driving force why I created BloggerCMS. Here is complete list of features of BloggerCMS as of now:

- **Graphical User Interface** - manage your site via a browser
- **File-based** - no database required
- **Truly Static** - no server-side languages needed
- **Portability** - copy, move, backup or version control your site easily
- **Integrated Markdown Editor** - no need to know Markdown
- **Built-in Images Manager**
- **Disqus Commenting System**
- **Search Posts Feature**
- **Pagination**
- **Responsive Layout** - get started easily with the included responsive layout
- **RSS Support**
- **Sitemap Support**
- **Google Analytics**
- **Code Highlight Support**
- **Tags Cloud Support**
- **Social Follow Section**
- **Categories Section**
- **Archives Section**

To know more about BloggerCMS, head over to [it's blog](https://bloggercms.github.io) or see [introductory post](https://bloggercms.github.io/post/introducing-bloggercms.html).

 ![](http://feeds.feedburner.com/~r/codeinphpfeed/~4/HUVSHrAYduo)
Building something with a Raspberry Pi
Published: 2022-09-26 20:16:52

---
title: Building something with a Raspberry Pi
published: true
date: 2015-04-05 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2015/building-something-with-a-raspberry-pi/
---

Many years ago I spent a lot of time learning about electronics. It was great fun, I can’t remember specific things I built, but learning what resistors and capacitors do was fascinating.

I haven’t really thought about this much as my interests have been concentrated on computers and programming, but recently my interest has been peaked again.

![](https://storageaccountblog9f5d.blob.core.windows.net/blazor/wp-content/uploads/2015/04/Raspberry_Pi_-_Model_A.jpg)

The [CodeNewbie](http://www.codenewbie.org/) and [Hanselminutes](http://hanselminutes.com/) podcasts have been running a month of stuff about making things and doing clever things with hardware called [#Marchisformakers](http://marchisformakers.com/), this began to start me thinking about this stuff again.

Yesterday a friend of mine was showing me what he had been doing with a Raspberry Pi and Arduino. It is amazing what you can do with these tiny bits of technology and I was very impressed.

Now I am thinking what mini project could I play around with and which piece of hardware should I base it on. I don’t know much about the two platforms yet but I have found a [blog](http://www.codenewbie.org/blogs/everything-you-ever-wanted-to-know-about-arduino-and-raspberry-pi) post that introduces the two. My current thoughts are to start with the Raspberry Pi, it is a UK technology and it uses a linux OS (which I have some knowledge of).

Being a windows developer, most of my programming knowledge is with C# and Visual Studio. To use my existing knowledge I could install and use MONO, which means I can program the Raspberry Pi using C# (see [here](http://logicalgenetics.com/raspberry-pi-and-mono-hello-world/) for more details about MONO on Raspberry Pi).

But deciding on a language to use, doesn’t help me choose a project. I haven’t even got myself a Raspberry Pi yet so I may decide more once I have had a play around with it. Thoughts so far include getting wi-fi to work on the Raspberry Pi or maybe adding a camera and sticking it somewhere and taking pictures, maybe even build myself a baby monitor (might go down well with the wife if its baby related)
Building a CI Server with TeamCity
Published: 2022-09-25 18:54:40

---
title: Building a CI Server with TeamCity
published: true
date: 2015-04-01 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2015/teamcity/
---

TeamCity is a Continuous Integration software package which is very easy to install and set up. So easy I managed it over a weekend.

First of all I fired up a VM in Azure. I found that a Basic A1 VM was sufficient so running a CI server doesn’t have to be expensive, alternatively you could always set a Virtual or Physical server on your own network, but that of course takes a bit longer to set up.

Before I get too far you are probably asking what is Continuous Integration. A Continuous Integration server takes your code from your source control repository, it then automatically builds it, runs automated tests against it and can even deploy it to production. The main advantages of this is that you can see the health of you code, you can also test different configurations.

So once you have a server ready, you need to install a few things. First [TeamCity](https://www.jetbrains.com/teamcity/download/), just install with the default settings. My project is a Visual Studio project so I also needed to install Visual Studio (They have a free edition which does everything I need now, Thank you Microsoft) and SQL Server Express Edition.

Once TeamCity is installed the rest of the config can be made via the web interface. To make it easier I pointed a domain at my VM (a CNAME record is probably better as an Azure IP address may change) and opened port 80 in the Azure config. First create a build config and then create a VCS Root, this is where you specify where your source control is. TeamCity supports Github and bitbucket and probably many others. You can specify which branch you want to checkout so you can test out the latest features you have written.

Next you need to configure the steps needed to build your project, whatever you do in Visual Studio can be configured here. You then need to configure how often the build should run, it can be scheduled at specific times, this is how I remember CI servers being configured but now you can also have builds being triggered after commits to source control, very clever.

That is just about all I have configured so far. My project has a few NUnit tests written for it, these are scheduled to run after every build. In my case 94 of them are currently failing so I now need to learn how my tests work.

There are additional deployment steps that can be configured but I have not investigated these yet. Notifications about what CI is doing is also possible usually by email but there are other options available.
Get container ID from within container
Tags: docker, shell, linux
Published: 2015-04-05 12:11:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: Get container ID from within container
slug: get-container-id-from-within-container
date: 2015-04-05 12:11
tags:
 - docker
 - shell
 - linux
---

To get the container ID from within a container, use this:

    $ cat /proc/self/cgroup | grep "docker" | sed s/\\//\\n/g | tail -1
    
I'll probably stick it in an npm module at some point.
Shell settings for safer scripts
Tags: shell, bash, linux
Published: 2015-04-05 09:51:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: Shell settings for safer scripts
slug: shell-settings-for-safer-scripts
date: 2015-04-05 9:51
tags:
 - shell
 - bash
 - linux
---

I was just reading through one of Progrium's scripts when I came across `set -eo pipefail` at the beginning of a script. Having not seen that before, I decided to Google. This is the result of that.
    
You can use `set` to manipulate shell variables and functions. Some of these can help you write safer scripts.

    set -e

If any command fails, `set -e` will make the entire script fail, rather than just skipping onto the next line. If you want to allow a line to fail then you can pop `|| true` onto the end of it. 

    set -u

This will treat unset variables as an error, and immediately exit the script.

    set -o pipefail

By default only the last command in a list of piped commands returns a failure code if it fails. By using `set -o pipefile`, if any of the commands fail, the line will fail. Using this with `set -e` means that if any command in a piped command fails, the script will fail.

Now back to [my reading...](https://github.com/progrium/docker-consul/blob/master/start)