teleren/devto huggingface dataset:
Custom Buildpacks in Heroku
Published: 2019-08-21 20:18:27

So picture this - you’re building a web app and hosting it on [Heroku](https://www.heroku.com/). The frameworks and tech stack you’re using, however, has some configuration problems and don’t quite push to Heroku in the way that you would like - maybe your repo doesn’t quite have the structure you need on site, something that was abstracted away locally by something or other. What should you do?

### Enter: Custom Heroku Buildpacks!

Heroku allows for applications to take any buildpack that the admin specifies and runs that buildpack before deployment. To add a new buildpack to your app, simply run

```
heroku buildpacks:set https://github.com/some/buildpack.git -a myapp
```

in the terminal and you should be good to go.

##### So what do these buildpacks look like, exactly?

According to the [Heroku docs](https://devcenter.heroku.com/articles/buildpack-api), buildpacks contain three main files which are executed at runtime:

- `bin/detect`: Determines whether to apply this buildpack to an app.
- `bin/compile`: Used to perform the transformation steps on the app.
- `bin/release`: Provides metadata back to the runtime.

#### `bin/detect`

The `detect` file will determine if the application this buildpack is mounted on is suitable for the buildpack itself. It’s essentially a safeguard to ensure that you’re working within the right frameworks for whatever your buildpack is about to do.

It receives one argument, `BUILD_DIR`, which is the root of the app itself. From there `detect` should analyze the file structure to see if it is compatible (for instance, if you need it to be a Rails app, make sure there’s a Gemfile and config.ru).

#### `bin/compile`

This file actually executes what you set out to do with this buildpack. This can be whatever you want!

In addition to `BUILD_DIR`, it also receives a `CACHE_DIR` argument, which represents a directory that the buildpack can use to cache files between builds.

Additionally, it receives a third argument, `ENV_DIR`, which is a file directory that contains all of the environment variables provided from the Heroku setup. In this directory, the file name is the variable name, and the file contents are the variable’s value.

#### `bin/release`

An optional file to be run, this program will return a list of `addons` and `default_process_types` for the application to use, in YAML format. `addons` is only executed on the first deployment. If you’re trying to add additional technologies in the app based on the buildpack, this is a good place to do that.

* * *

With this information, it’s easy to do a variety of things before deployment to Heroku. A variety of custom buildpacks are listed on Heroku’s website [here](https://elements.heroku.com/buildpacks), but go ahead and make your own if nothing quite fits your use case!
SQL Server Management Studio
Tags: softwaredevelopment, database, development, sqlserver
Published: 2020-02-05 20:26:12

---
title: SQL Server Management Studio
published: true
date: 2015-12-03 08:00:26 UTC
tags: SoftwareDevelopment, database, development, sqlserver
canonical_url: https://www.funkysi1701.com/2015/12/03/line-breaks-stored-in-sql-server/
---

I use SQL Server Management Studio all the time for writing queries, getting data and general SQL development.

![SQL Server Management Studio](https://i1.wp.com/www.funkysi1701.com/wp-content/uploads/2015/12/sql-server-2012-management-studio-splash-screen.png?resize=529%2C360)

I have enjoyed seeing the improvements that each new version of SQL Server Management Studio (SSMS) introduced. One great improvement was intellisense.

This feature saves typing and reduces errors by automatically suggesting tables, column names or other database objects.

A common query that I get asked to write is provide a spreadsheet that gives the information that satisfies certain criteria. This is easy to do in SSMS, you can write the query, click execute and the rows that satisfy the criteria are displayed. These rows can then be easily copy/pasted into Excel or other spreadsheets.

A common data item that gets stored in databases is addresses and addresses often contain line breaks to make the data display better. In the earlier versions of SSMS, when you copied and pasted these line breaks were ignored and the data displayed the same in SSMS as it did in Excel. However in the more recent version, theses line breaks got copied across breaking your spreadsheet and making it hard to see what data corresponded with what.

Now I don’t know if this should be described as introducing a bug or fixing one. I can easily argue both sides. If your data contains a line break and you copy this data it should include the line break in the destination, but if it does that it displays badly in Excel.

The fix I have been using until recently is to use the following TSQL command in my queries.

> SELECT REPLACE(REPLACE(@str, CHAR(13), ”), CHAR(10), ”)

This command replaces any line breaks with an empty string. Both Char(10) and Char(13) are needed because you can have different types of line breaks. This is great if you are writing the script from scratch but isn’t great if your are running a stored procedure or your query has a lot of columns.

The answer to this is to use Visual Studio to run your SQL query. In Visual Studio you can write and run queries via Server Explorer and the results produced don’t contain line breaks. I have only just discovered this solution, but so far it has worked and is very easy to do, plus as I do most of my development in Visual Studio anyway it saves me having to open SSMS to test my queries.

The post [SQL Server Management Studio](https://www.funkysi1701.com/2015/12/03/line-breaks-stored-in-sql-server/) appeared first on [Funky Si's Tech Talk](https://www.funkysi1701.com).
Website Authentication Protocols
Tags: authentication, oauth
Published: 2020-10-01 06:22:10

---
title: Website Authentication Protocols
published: true
date: 2015-12-01 00:00:00 UTC
tags: Authentication,OAuth
canonical_url: https://www.loginradius.com/engineering/blog/website-authentication-protocols/
---

Authentication systems are the backbone of many websites. It allows users to log in to your site and preserving data between visits. It is crucial in offering a robust user experience which rewards your users for providing their details. Authentications often provide access to…

   
[Read On](https://www.loginradius.com/engineering/blog/website-authentication-protocols/)
Change keyboard layout on Ubuntu + Xrdp
Tags: ubuntu, xrdp
Published: 2015-11-30 09:45:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: Change keyboard layout on Ubuntu + Xrdp
slug: change-keyboard-layout-on-ubuntu-xrdp
date: 2015-11-30 09:45
published: true
tags: 
 - ubuntu
 - xrdp
---

If you're using Ubuntu with Xrdp, and you find the keyboard to be infuriatingly inaccurate, you should probably change it. To do this, you need to have the ability to open the `System Settings` window, which you can't always do over RDP. In there, go to `Text Entry`, and click the little plus at the bottom. Now select the keyboard layout that applies to you, and test it works.

Now, finally, to make these settings apply to Xrdp, run the following command:

    sudo xrdp-genkeymap /etc/xrdp/km-0409.ini
    
Logout, log back in with Xrdp and it should now work.
“The local security authority cannot be contacted” – Remote Desktop
Published: 2020-11-05 20:49:47

---
title: “The local security authority cannot be contacted” – Remote Desktop
published: true
date: 2015-11-25 21:52:00 UTC
tags: 
canonical_url: https://www.alexhyett.com/the-local-security-authority-cannot-be-contacted/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gizvk6kxbdhr8ewzci12.jpg
---

Recently I had to restore a number of virtual machine servers from a previous snapshot. Unfortunately, the domain controller snapshot was taken at a different time to the other machines.

All seemed well as I logged on to each machine remotely with the domain administrator account. That was until one of them returned with the following error:

> An authentication error has occurred. The Local Security Authority cannot be contacted.
> 
> This could be due to an expired password. Please update your password if it has expired. For assistance, contact your administrator or technical support.

## The Local Security Authority cannot be contacted. This could be due to an expired password.

The error suggests that the password could have expired on the account. From Googling around it is apparently possible to log in with the local administrator account and reset the password. In my case, I couldn’t log in to the local account remotely and still got the same error above.

It was possible however to log in from the VMWare console and get access to the box. I was a bit reluctant to reset the domain administrator password considering I could log on to the other boxes. When logging on locally with the domain administrator account I got this error:

> The trust relationship between this workstation and the primary domain failed.

So what causes this problem? Well, every 30 days the machine’s private secret which is shared with the domain controller changes. Unfortunately for me that private secret changed between the dates the snapshots were taken on the two machines.

The [fix from Microsoft](https://support.microsoft.com/en-us/kb/2771040) for this is to remove the computer from the domain controller and rejoin it but this isn’t always possible and is a bit heavy-handed.

To fix this you need to log on locally as the local administrator and run the following in PowerShell.

```
$credential = Get-Credential
```

You will be prompted for account credentials at this point. You should use the domain administrator account for this. Then run the following:

```
Reset-ComputerMachinePassword -Credential $credential -Server dc.dev.local
```

The server should be the hostname of the domain controller.

If this errors it might be because you are using PowerShell 2 instead of 3 which doesn’t support the credential parameter. In this case, just run this and you should be prompted for credentials.

```
Reset-ComputerMachinePassword -Server dc.dev.local
```

You should now be able to log in as the domain administrator again.

I haven’t tried it myself but others have also had success with the following command:

```
Test-ComputerSecureChannel -Repair -Credential $credential
```

If this gets you out of a tight spot please leave a comment below.
Show and Tell
Tags: agile
Published: 2020-03-28 21:40:59

---
title: Show and Tell
published: true
date: 2015-11-25 05:21:06 UTC
tags: Agile
canonical_url: http://blog.boochtek.com/2015/11/24/show-and-tell
---

I’m wrapping up my current consulting gig at Mercy in December, and starting a new gig at CenturyLink. I’m a software developer, but that’s only a part of what I do. What I really do is join a team and help them improve the way they work — both their processes and their technical skills.

I think this is a key differentiator for me as a consultant. Most consultants (and Agile coaches) come in and tell people what to do. I don’t like to just tell people what to do. I’d much prefer to work side-by-side with them, getting a better understanding of what their challenges are. Once I have a better understanding of the challenges, I’m able to better brainstorm some ideas to try. Then we can experiment to see what will work and what won’t.

Instead of telling people what to do, I show them how. Most people learn better from seeing than from hearing. They also learn better if you explain how and why, not just what. So showing them how to do something is more effective than telling them. By showing and doing, you can also set a good example. This is especially important when collaboration is a large part of what needs to be improved.

I’ve found that this style of consulting is more highly respected by everyone. I build trust with developers by working closely with them. Managers like to keep me around once they see how effective these methods can be, so the gigs I take on tend to last relatively long.

The biggest problem I have is explaining how this works. I don’t really know what to put on my résumé. Sometimes I call myself an Agile practitioner, and sometimes an Agile player/coach. But those aren’t terribly satisfying descriptions. I’m considering actually putting “I help teams improve the way they work — both their processes and their technical skills” on the résumé. But that seems awkward, and misses the show versus tell part. I’d be open to any suggestions.
Nim Game, Add Digits, Maximum Depth of Binary Tree
Tags: nim, javascript
Published: 2020-10-05 06:57:43

---
title: Nim Game, Add Digits, Maximum Depth of Binary Tree
published: true
date: 2015-11-24 00:00:00 UTC
tags: Nim,JavaScript
canonical_url: 
---

1. Nim Game Click to View Original Question This question is very easy once you figure out the trick behind the game. Since each time you can only pick 3 stones at most, if there are 4 stones originally on the table, no matter how many you take ... your hopefully non-stupid…

   
[Read On](https://www.loginradius.com/engineering/blog/nim-game-add-digits-maximum-depth-of-binary-tree/)
Know your terminology
Tags: projectmanagement
Published: 2019-12-16 10:45:21

---
title: Know your terminology
published: true
tags: project management
canonical_url: 
---

What’s the deal with Windows apps terminology? I know it got messed up and easy to confuse, especially when you are not inside the Windows world, and platform resets done by Microsoft in the last few years certainly didn’t help. But there are quite a lot people who **should** understand it and they don’t. They just don’t want to invest that little time needed to understand what they are working with, and that’s the reason for this post.

### The state of Windows apps

Since I’ve been dealing with Windows (Phone) apps since they appeared, I can testify there was quite a lot of confusion with people who weren’t into the platform. Microsoft is once again resetting the platform, ditching the “Phone” part of the name for mobile OS and not providing any official name for it. I see this as their intention to make sure people understand that it’s the same one OS, one Windows 10. And while it really is one OS, one build can run on all kind of devices, people are now confused even more. Clients and project managers will say: “_How do you mean it’s not Windows Phone? I want an app that runs on phones_“.

### True story

I **know** there was at least one such confusion when Windows Phone 7 came around and client wanted an app for it. Now I’m not familiar if the client couldn’t communicate it well, or project manager didn’t bother to understand the requirement, but somehow a new project for Windows Mobile was created. You can see from example like this why it’s crucial that people who make decisions really understand the terminology they are dealing with.

### Not only Windows

Unfortunately, this kind of “_I don’t care, get it done_“ attitude is not limited to Windows apps development, or software development at all. When you are dealing with some business, you should make sure you understand at least the basic terminology, there are simply no excuses. Especially when you want to do a project and make some money from it.
Yak shaving. A short definition!
Tags: task, development, definition, short
Published: 2017-09-23 22:07:43

---
title: "Yak shaving. A short definition!"
published: true
tags: task,development,definition,short
canonical_url: https://stefancosma.xyz/2015/11/23/yak-shaving-a-short-definition/
description: Have you ever started to work on a task and suddenly you realized that said task requires some other little task(s) to be finished beforehand. That's yak shaving for you, the tl;dr version.
---

 ![Yak shaving. A short definition!](https://stefancosma.xyz/content/images/2015/11/ibaDjk7AeIcvxv.gif)

Have you ever started to work on a task and suddenly you realized that said task requires some other little task(s) to be finished beforehand. That's yak shaving for you, the tl;dr version.

You've probably done this multiple times and you did even realize it.

Back in 90s a Ph.D. at MIT by the name of [Carlin J. Vieri](http://projects.csail.mit.edu/gsb/old-archive/gsb-archive/gsb2000-02-11.html) produced this term to describe

> what you are doing when you're doing some stupid, fiddly little task that bears no obvious relationship to what you're supposed to be working on, but yet a chain of twelve causal relations links what you're doing to the original meta-task.

Let me give you an example, that you can relate to.

You're working on an older project. Let's say that you're ready to deploy, but you suddenly realize that you forgot to set up the Digital Ocean droplet. You start setting that up, but it dawns on you that you need a certain version of PHP. Before you start downloading and setting that up you realize that there are some security issues that need addressing with your droplet.

And thus you find yourself in an ongoing spiral of never ending little tasks that divert you from the main task. Another comparison would be something like side quests in an RPG type game.

Why do we do this?

I think it has to do with the human nature. We're not a species that does things instinctively. We don't know what things can come up at any point in time. At least that's how I see things. Any other thoughts on this?

Until next time, code long and proper!

Stefan



_This post was originally published on [stefancosma.xyz](https://stefancosma.xyz/2015/11/23/yak-shaving-a-short-definition/)_
Great Tool Spotlight: Animate it with ScreenToGif
Tags: tools
Published: 2018-01-03 02:45:06

---
title: "Great Tool Spotlight: Animate it with ScreenToGif"
published: true
tags: tools
canonical_url: https://SeanKilleen.com/2015/11/great-tool-spotlight-animate-it-with-screen-to-gif/
---

On this blog, I often use screenshots to illustrate tutorials. This leads to long blog posts and I never feel like the full context is there because they’re not animated. I avoided trying to capture animations because, in my experience, the software out there to do so was buggy or overly complex and added more burden value.

Well, no more. Thanks to a colleague’s suggestions, I found [ScreenToGif](https://screentogif.codeplex.com/). It’s a quick/painless download & install.

It’s also available [via Chocolatey](https://chocolatey.org/packages/screentogif). Run `choco install screentogif` and you’ll have it in no time.

How to demo this? I went a little meta on things. :) See below for a gif of a ScreenToGif capture of itself capturing a window for a little tutorial.

![](https://SeanKilleen.com/images/post-images/ScreenToGif_Tutorial.gif)

The app is well built and fulfills its main purspoe with relatively little cruft. Best of all, it’s free and open source! I definitely recommend adding it to your toolbox.

Let me know if you have any questions or similar tools in the comments.

[Great Tool Spotlight: Animate it with ScreenToGif](https://SeanKilleen.com/2015/11/great-tool-spotlight-animate-it-with-screen-to-gif/) was originally published by Sean Killeen at [SeanKilleen.com](https://SeanKilleen.com) on November 10, 2015.
Use Hibernate with Texo Model Entities
Tags: hiberanate, texo, java, orm
Published: 2019-08-02 13:16:48

---
title: Use Hibernate with Texo Model Entities
published: true
tags: hiberanate, texo, java, orm
canonical_url: http://shanalikhan.github.io/2015/11/19/Use-hibernate-with-texo-models.html
---

[Hibernate](http://hibernate.org/orm/) is the best [ORM](https://en.wikipedia.org/wiki/Object-relational_mapping) in Java. It provides a wrapper in .NET also as NHiberate.But it can be tough when you have alot of entities to create manually and create a reference between them. The most comprehensive task is to manually develop the relationship between them. Yes there is database-approach also which generates all the things from the database, We are currently supposing model first approach and then connect database with it.

Eclipse provides many tools to generate the simple POJO classes by a simple visualizer. [Texo](http://wiki.eclipse.org/Texo) is one of the good plugin in Eclipse that generate entities from EMF ecore models. When you connect the texo generated entities with hibernate via mapping in XML files. It pop out an error that

> Failed to create sessionFactory object.java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Set

Because the Texo genenates entities with LIST type and hibernate gives an error. We can to generate all the Collection objects as a SET in order to solve the problem.

> To resolve the problem we have to generate the ORM ANNOTATED MODEL and set all the collection attributes "use list" property to false

![Generate the Texo Hibernate](http://shanalikhan.github.io/img/texo_hibernate1.png)

![Selecting the collection object](http://shanalikhan.github.io/img/texo_hibernate2.png)

![Create new Gen Annotation for object](http://shanalikhan.github.io/img/texo_hibernate3.png)

![set use list = false](http://shanalikhan.github.io/img/texo_hibernate4.png)
The truth about CSS preprocessors and how they can help you
Tags: css
Published: 2020-10-05 10:50:03

---
title: The truth about CSS preprocessors and how they can help you
published: true
date: 2015-11-17 00:00:00 UTC
tags: CSS
canonical_url: 
---

As a preface to this article: preprocessors can be used for a variety of file types, but this article is going to focus solely on CSS preprocessors. Additonally I'm going to try and avoid my personal bias and give a very generic description of CSS preprocessors rather than my…

   
[Read On](https://www.loginradius.com/engineering/blog/the-truth-about-css-preprocessors-and-how-they-can-help-you/)
Star Trek is back (in 2017)
Tags: startrek, podcast
Published: 2021-01-19 22:52:44

---
title: Star Trek is back (in 2017)
published: true
date: 2015-11-12 08:00:05 UTC
tags: StarTrek,podcast,startrek
canonical_url: https://www.funkysi1701.com/2015/11/12/star-trek-is-back-in-2017/
---

![3f448330857e4ca7ba40ab5465a3c2cb62cdb98c](https://i0.wp.com/www.funkysi1701.com/wp-content/uploads/2015/11/3f448330857e4ca7ba40ab5465a3c2cb62cdb98c.png?resize=620%2C260)

As you have probably heard Star Trek is coming back to TV. I recently joined with the Sci Fi Waffle podcast to discuss.

Sci Fi Waffle: Episode 12 – STAR TREK IS BACK!!

In this episode we discuss the great news that Star Trek IS BACK!!.

Shawn and I are joined again by James Roberts and TrekMates News feed Editor Simon Foster to speculate about the announcement of a new Star Trek TV series due to debut in January 2017.

James can be found on our sister podcast [The Battle Bridge](http://www.trekmate.org.uk/category/the-battle-bridge/) and Simon can be found on Twitter [@funkysi1701](https://twitter.com/funkysi1701)

To listen go [http://www.trekmate.org.uk/sci-fi-waffle-episode-11-star-trek-is-back/](http://www.trekmate.org.uk/sci-fi-waffle-episode-11-star-trek-is-back/), to leave feedback go [http://forum.trekmatefamily.com/](http://forum.trekmatefamily.com/)
Beginner's Guide for Sublime Text 3 Plugins
Tags: sublimetext, codeeditor
Published: 2020-10-05 10:49:53

---
title: Beginner's Guide for Sublime Text 3 Plugins
published: true
date: 2015-11-10 00:00:00 UTC
tags: SublimeText,CodeEditor
canonical_url: 
---

Getting started with one of the lightweight Code Editor Sublime Text and introduction to Snippets, Project and Macros

   
[Read On](https://www.loginradius.com/engineering/blog/beginners-guide-for-sublime-text-3-part-2/)