teleren/devto huggingface dataset:
Using Facebook Graph API After Login
Tags: facebook, graphapi
Published: 2020-10-05 10:54:26

---
title: Using Facebook Graph API After Login
published: true
date: 2015-09-29 00:00:00 UTC
tags: Facebook,GraphAPI
canonical_url: 
---

Facebooks Graph API gives you the ability to better understand and target content to your user. In this blog we go over some useful implementations of the Graph API that you can use to pull in user data as well as publish on your users behalf. Getting Your Site Ready The first…

   
[Read On](https://www.loginradius.com/engineering/blog/using-facebook-graph-api-after-login/)
Biology and CSS
Tags: css, inheritance
Published: 2018-09-19 13:50:19

---
title: Biology and CSS
published: true
tags: css,inheritance
canonical_url: http://designfrontier.net/biology-and-css
---

I am the average height of my grandfather’s generation. I have brown hair, that is rapidly going gray even at the ripe old age of 31. I have blue eyes and olive skin.

Now that you know more about my physical appearance than you wanted to let’s get down to brass tacks.

The inheritance model that resulted in me having these physical characteristics is complex. At a genetic level during my mother’s pregnancy, recessive and dominant traits were engaging in complex calculations to determine what physical attributes I would have. Blue eyes beat out my brother’s hazel eyes, and my sister’s brown eyes. The early graying gene and brown hair beat out my sister’s red hair.

At this point you are wondering if you have stumbled onto the wrong blog. Because what does this have to do programming and CSS?

Well it turns out that CSS uses basically the same inheritance model. Just like each of your parents contributed traits to you. Different parts of their biological inheritance influence your physical attributes. DOM elements go through the same thing. They inherit different attributes from their parents and based on a dominance calculation (specificity!) their appearance takes shape.

I’ve found that this tends to make thinking about CSS inheritance a lot easier. This isn’t CS inheritance that you have seen in other languages. This is inheritance as your body knows it. This is one of the most dynamic and powerful inheritance models in existence. Enjoy it! Sure it looks like magic sometimes, but so does any sufficiently advanced technology.
Automated Testing of Dotfiles
Published: 2017-10-31 19:51:26

---
title: "Automated Testing of Dotfiles"
published: true
tags: 
canonical_url: https://michael.mior.ca/blog/automated-testing-of-dotfiles/
---

Several years ago I started managing my dotfiles based on Zach Holman’s [dotfiles repo](https://github.com/holman/dotfiles). His setup is quite nice and I found it relatively easy to adapt to my own purposes. My workflow generally consisted of making a bunch of local changes until I was happy and then pushing to my own [GitHub fork](https://github.com/michaelmior/dotfiles).

The big problem I eventually found is that I wasn’t fully capturing the correct steps to reproduce my environment. Every time that I tried to install my dotfiles on a new machine, I would be met with several errors that I would eventually resolve. The fix would not always result in something which was reproducible on another machine. I wanted a solution that would let me automatically test that my dotfiles would cleanly install every time I pushed to GitHub, so I turned to [Docker](https://www.docker.com/).

Traditional CI services would have been a bit of a pain to use with all the packages that needed to be installed.[Docker Hub](https://hub.docker.com/r/michaelmior/dotfiles/) made things nice and easy. My [Dockerfile](https://github.com/michaelmior/dotfiles/blob/a9eae90d466958948a53b3b583d69eba844ed8f7/Dockerfile) simply installs the necessary OS packages, adds a new user and then tries to run my install script. I currently don’t have any other testing other than to ensure that the script exits without error, but this has already saved me a lot of trouble.

**Update** : I have since switched to using [Travis CI](https://travis-ci.org/michaelmior/dotfiles) as I do with my other projects. It turns out this is easier than I expected. I still haven’t explicitly added any tests but even being able to confirm that the installation steps succeed is useful to ensure nothing breaks.
Hi, My Name is Darryl, and This is How I Work
Tags: tools, engineering
Published: 2020-10-05 10:53:48

---
title: Hi, My Name is Darryl, and This is How I Work
published: true
date: 2015-09-22 00:00:00 UTC
tags: Tools,Engineering
canonical_url: 
---

Ever wondered how I work? No? Well, too bad, I'm still gonna write about it. Hello and welcome to a blog post dedicated to me. In this episode, I'm going to tell you about the tools I use, the things I do to get design inspiration, and what I do when I get stuck on a project. Let…

   
[Read On](https://www.loginradius.com/engineering/blog/my-name-is-darryl-this-is-how-work/)
Beginner's Guide for Sublime Text 3
Tags: sublimetext, codeeditor
Published: 2020-10-05 10:53:54

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

Getting started with one of the lightweight Code Editor Sublime Text and it's package control and shortcut commends

   
[Read On](https://www.loginradius.com/engineering/blog/beginners-guide-for-sublime-text/)
Reclaim your inodes by deleting dangling docker volumes
Tags: docker, linux, bash
Published: 2015-09-08 15:49:00

---
title: Reclaim your inodes by deleting dangling docker volumes
slug: reclaim-your-inodes-by-deleting-dangling-docker-volumes
date: 2015-09-08 15:49
tags:
 - docker
 - linux
 - bash
---

_Originally posted on September 8th, 2015_ ([more info](https://dev.to/adamkdean/migrating-to-dev-to-190))

_Note: these days, you can simply use `docker volume prune`, but this is being posted for posterity. This was an issue which caused lots of problems back in 2015, and determining ways of managing inode usage helped a number of platforms including Shopify, who took containerisation to a new level._

Earlier today I had a strange issue where Docker builds started failing, citing there was no free space. When I looked, there was gigabytes of free space. I looked into this further and found that Jenkins liked to open a *lot* of files. 30,000 for a fresh install, in fact. I thought this was my problem but it wasn't. Something else was causing the system to run out of space.

I dug around a bit more and found that the problem was inodes, which are data structures used to represent filesystem objects such as files or directories. To be more precise, the problem was a distinct lack of available inodes. Of the 2.9 *million* available, 2.9 *million* were in use. That's 100%.

I had a funny feeling that dangling volumes had something to do with this, so I had a look at how many I had:

    $ docker images -qf 'dangling=true' | wc -l
    100

These were quite large images too, comprising of multiple files and directories. So many in fact that it was using up all the inodes available on the system. To repeat, that was 2.9M inodes.

I was able to clear it up by running `docker images -qf 'dangling=true' | xargs docker rmi`, which takes a while but cleared it up. In case this happens in the future, I've put some logging in place to keep an eye on the inode usage, and created a little script for people to use in case I'm not around and this happens again.

Here is `can-i-have-my-inodes-back-please.sh`:
    
    #!/bin/bash
    #
    # Are your inodes all tied up?
    # Would you like to make them liquid again?
    # Run this script for up to instant relief
    # (smallprint: maytakeuptotwentyminutesdependingonnumberofdanglingvolumes)
    
    DANGLING_NUM=$(docker images -qf 'dangling=true' | wc -l)
    
    read -p "Are you sure you want to remove $DANGLING_NUM dangling volumes? (Y/N) " prompt
    
    if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
      docker images -qf 'dangling=true' | xargs docker rmi
    else
      exit 0
    fi

And in case you're interested, the crontab runs this script hourly, `log-inode.sh`:

    #!/bin/bash
    INODE=$(df -i | sed -n 2p | awk '{ print $5 }')
    DATE=$(date +'%m/%d/%Y %H:%M')
    echo "$DATE,$INODE"
    
In a few weeks I'll grab that csv data and bung it into Excel and see just how bad this inode problem is. Maybe a nightly dangling volume cleanup will do the trick.
Social Network Branding Guidelines
Tags: social, sociallogin, branding
Published: 2020-10-05 10:54:33

---
title: Social Network Branding Guidelines
published: true
date: 2015-09-08 00:00:00 UTC
tags: Social,SocialLogin,Branding
canonical_url: 
---

I am here to tell you that Facebook, Google, Twitter, or LinkedIn aren’t going to be happy when they find out that you changed their icon color to green. But, hey at least you didn’t distort the logo. Hello and welcome to another segment of me telling you things that you need to…

   
[Read On](https://www.loginradius.com/engineering/blog/social-network-branding-guidelines/)
Index in MongoDB
Tags: mongodb, database
Published: 2020-10-05 10:54:39

---
title: Index in MongoDB
published: true
date: 2015-09-01 00:00:00 UTC
tags: MongoDB,Database
canonical_url: 
---

Index is a typical way to speed-up queries in normal database system. There is no difference between MongoDB and a document-based database system. This article gives insight about the index in MongoDB, for query optimization. Index in Mongo: Default \_id is an ObjectId object, 1…

   
[Read On](https://www.loginradius.com/engineering/blog/index-in-mongodb/)
Super quick way to back up and restore a Meteor Mongodb database
Tags: meteornerdspeak, mongodb
Published: 2021-10-16 02:13:05

---
title: Super quick way to back up and restore a Meteor Mongodb database
published: true
date: 2015-08-30 13:33:00 UTC
tags: meteornerdSpeak,mongodb
canonical_url: https://waiholiu.blogspot.com/2015/08/super-quick-way-to-back-up-and.html
---

If you're ever planning on doing anything experimental in your [Meteor](http://meteor.com/) solution and don't want to be corrupting your existing data, here is a quick way to back it all up and restore it.  
  
Firstly, you can't use the Meteor mongo command line as Mongodump doesn't exist there, so you must install the full Mongodb tool set on your machine. I just used brew to install on my Mac but instructions are at [http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/](http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/)  
  
To backup, just execute this command

mongodump -h 127.0.0.1 --port 3001 -d <nameOfDatabase>

  

This puts the backup inside the folder dump/<nameOfDatabase> relative to the folder you ran the command in. Generally I like to put it in the folder as my app solution.

  

To restore back to the state of the last backup, just execute this command

  

mongorestore -h 127.0.0.1 --port 3001 -d meteor --drop dump/<nameOfDatabase>  
  
Changing the database name, this allows you to have multiple backups too.
Github Atom Plugins for Web Developers
Tags: atom, productivity
Published: 2019-08-02 13:42:25

---
title: Github Atom Plugins for Web Developers
published: true
tags: atom, productivity
canonical_url: http://shanalikhan.github.io/2015/08/28/Github-atom-plugins-for-web-developer.html
---

Atom by Github is an amazing , powerful and modern text editor when compared to other text editors and the one major reason to support this editor is that Github has got its back !If you are a web developer and looking forward to get your hands dirty in the new editor. Atom is great for learning and takes your productivity to next level but only if you know what features you need in order to so your work. There are thousands of plugins developed by Atom community which really helps in increasing your productivity.These plugins should be on every developer Atom pocket.

- **[atom-beautify](https://github.com/Glavin001/atom-beautify)**  
  Atom beautify is a handy tool in order to make your code beautiful on just one tap while coding. It also beautifies the minified files in almost in every language.
- **[atom-typecript](https://github.com/TypeStrong/atom-typescript)**  
  If you are a lover of typescript and looking to work on other editor than Visual Studio. This plugin fulfills all the required things like real time typescript to javascript conversion.
- **[emmet-atom](https://github.com/emmetio/emmet-atom)**  
  Auto complete is extended by this plugin and provide you many more core features that every web developer needs.
- **[highlight-selected](https://github.com/richrace/highlight-selected)**  
  Just double click one word and this plugin will highlight all the occurance in whole file. Really helpful
- **[atom-jshint](https://github.com/sindresorhus/atom-jshint)**  
  Looking forward to validate your javascript while you type ! That's sure for you. Highly Recommended.
- **[project-manager](https://atom.io/packages/project-manager)**  
Really helpful in order to make your folder as project and open it on just a one click away like Eclipse etc- **[minimap](https://atom.io/packages/minimap)**  
  Really helpful in showing your code preview in right or left bar of the editor. Best working with [Highlight Selected](https://atom.io/packages/minimap-highlight-selected)
- **[atom-sync-settings](https://github.com/Hackafe/atom-sync-settings)**  
Using Github Atom for your office and home ! Looking forward to sync your packages across all your devices. This is the best !
- **[preview](https://atom.io/packages/preview)**  
Working on template engine like Jade etc want to look real time preview of HTML or any other language. Here it comes !

These plugins should be installed in your Atom. Believe me it will really enchance your productivity. Comment below if you know other best plugin.
Add notices to auto-generated files with gulp
Tags: npm, node, gulp
Published: 2015-08-25 14:17:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: Add notices to auto-generated files with gulp
slug: add-notices-to-auto-generated-files-with-gulp
date: 2015-08-25 14:17
published: true
tags:
 - npm
 - node.js
 - gulp
---

I wrote a little tool today to pop into my gulp workflow which writes some text to the top of files processed by gulp. The problem I find is that quite often you can be working on a project with source files and generated files (e.g. jsx -> js) and accidentally edit the wrong file, only for your changes to be overwritten.

This tool will put a notice at the top of auto-generated files to hopefully help put a stop to that. There are other packages that do this too, but so far in the past week there have been about 10 releases of gulp-header and quite a few of them were broken. Also they originated from godaddy so confidence in the package is pretty low!

## Usage

You can use the default notice:

    var gulp = require('gulp'),
        notice = require('gulp-notice');

    gulp.task('default', function () {
        gulp.src('src/*.js')
            .pipe(notice())
            .pipe(gulp.dest('dist/'));
    });

Which will prepend files with:

    /* --------------------------------------------------------------------- *\
    |  This code was auto-generated by a tool.                                |
    |                                                                         |
    |  Changes to this file may cause incorrect behavior and will be lost if  |
    |  the code is regenerated.                                               |
    \* --------------------------------------------------------------------- */

Or you can provide your own string as the first parameter:

    var gulp = require('gulp'),
        notice = require('gulp-notice');

    var text = '/* this file was auto-generated */';

    gulp.task('default', function () {
        gulp.src('src/*.js')
            .pipe(notice(text))
            .pipe(gulp.dest('dist/'));
    });

 Which will prepend files with:

    /* this file was auto-generated */

## Working wth streams

If you're working with streams (e.g. vinyl-source-stream) then gulp-streamify will help you. Let's say you're using browserify with vinyl-source-stream, you can wrap gulp-notice with streamify and it'll work:

    return b.bundle()
        .pipe(source(entry))
        .pipe(streamify(notice()))
        .pipe(gulp.dest('./public/js'));

## Install it

    npm install gulp-notice
    
## More links

GitHub: https://github.com/adamkdean/gulp-notice  
NPM: https://www.npmjs.com/package/gulp-notice
Lotus DB Migrations Tips
Tags: lotus, ruby
Published: 2019-07-02 21:39:25

---
title: Lotus DB Migrations Tips
published: true
tags: lotus,ruby
canonical_url: https://leandrocp.com.br/2015/08/lotus-migration/
---

Lotus, just like Rails, also supports database migration through [Sequel Migrations](http://sequel.jeremyevans.net/rdoc/files/doc/migration_rdoc.html). It´s pretty simple but some things are not so clear.

**Create a migration**

```
lotus g migration create_my_table
```

**Enable UUID (PostgreSQL only)**

```
Lotus::Model.migration do
  up do
    execute 'CREATE EXTENSION "uuid-ossp"'
  end

  down do
    execute 'DROP EXTENSION "uuid-ossp"'
  end
end
```

**Use UUID as Primary Key**

```
Lotus::Model.migration do
  up do
    create_table :my_table do
      column :id, :uuid, null: false, default: Sequel.function(:uuid_generate_v4), primary_key: true
    end
  end

  down do
    drop_table :my_table
  end
end
```

**Use UUID as Foreign Key**

```
Lotus::Model.migration do
  up do
    create_table :my_table do
      column :id, :uuid, null: false, default: Sequel.function(:uuid_generate_v4), primary_key: true
      foreign_key :author_id, :authors, type: 'uuid', null: false
    end
  end
end
```

**Index a column**

```
Lotus::Model.migration do
  up do
    create_table :my_table do
      column :code, :integer, null: false
      index :code
    end
  end
end
```

**Table documentation**

```
Lotus::Model.migration do
  up do
    create_table :my_table do
      column :code, :integer, null: false
    end

    execute %Q(COMMENT ON TABLE my_table IS 'You should do it')
    execute %Q(COMMENT ON COLUMN my_table.code IS 'Easy and useful')
  end
end
```

**Migrate up**

```
lotus db migrate
```

**Migrate down**

There´s no `db migrate down` command, although you can specify a version to migrate. Just specify `0` to migrate to initial version (before any migration).

```
lotus db migrate 0
```
How to ab-USE CSS2 sibling selectors
Tags: engineering, selector, css
Published: 2020-10-05 10:54:47

---
title: How to ab-USE CSS2 sibling selectors
published: true
date: 2015-08-18 00:00:00 UTC
tags: Engineering,Selector,CSS
canonical_url: 
---

Hey there, spider. It’s me again, your amazing blog writer, Darryl. Have you ever wanted to select the second or third child of an element without using CSS3 nth-child —which aren’t working on grandpa browsers. Let’s face it, a lot of human beings are afraid of change that they…

   
[Read On](https://www.loginradius.com/engineering/blog/ab-use-css2-sibling-selectors/)
How complex are my stored procedures?
Published: 2022-07-09 12:52:36

---
title: How complex are my stored procedures?
published: true
date: 2015-08-13 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2015/how-complex-are-my-stored-procedures/
---

Recently me and my development team have been looking at performance and how to improve it.

One area of improvement we have identified is with our stored procedures, which we plan to rewrite. But how do we identify which are the easiest to rewrite and which are the hardest?

My first thought was maybe to count the number of times each keyword is used and rank them somehow. eg each JOIN gets 5, OUTER APPLY gets 20, each term in WHERE gets 1, and then combine that with the length of the query and how many parameters.

However doing a bit of googling I came across the following [blog](https://aalamrangi.wordpress.com/2012/12/24/calculate-tsql-stored-procedure-complexity) and [sql script](https://gallery.technet.microsoft.com/Calculate-TSQL-Stored-831b683a). This script analyses the stored procedures in terms of number of lines of code, number of parameters and number of dependencies.

The complexity is divided into SIMPLE, MEDIUM and COMPLEX.

```
WHEN NumberOfLines * NumberOfDependencies * NumberOfParameters < 5000 THEN ‘Simple’
WHEN NumberOfLines * NumberOfDependencies * NumberOfParameters < 10000 THEN ‘Medium’
ELSE ‘Complex’

```

![](https://storageaccountblog9f5d.blob.core.windows.net/blazor/wp-content/uploads/2015/08/reportscreenshot1.png?w=674&ssl=1)

This gives a fairly good estimate of which stored procedures are the most complex and which would probably take the longest time to rewrite.
ICYMI What does it mean?
Published: 2022-07-14 21:30:34

---
title: ICYMI What does it mean?
published: true
date: 2015-08-10 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2015/icymi-what-does-it-mean/
---

For a while now I have seen ICYMI splattered around the internet. I had no idea what it meant so just ignored it but I have finally had enough and I googled for a definition and I now know what it means.

```
ICYMI – In Case You Missed It

```

![](https://storageaccountblog9f5d.blob.core.windows.net/blazor/wp-content/uploads/2015/08/in-case-you-missed-it-small.jpg?w=400&ssl=1)ICYMI is often used on social media sites to indicate articles that you might have missed.

Software Development is littered with acronyms and technical terms that I don’t always know the meaning of.

When reading it is easy to ignore them and try and understand the rest of the article. However there are loads of resources out there that can explain technical terms in a wide variety of different ways.

I have tried to explain a few different terms and concepts on this [blog](http://www.funkysi1701.com/). In the process of writing them I often do a bit of research and read a variety of different definitions, some confuse the heck out of me, while others make me go ahh that makes sense now.

When reading to learn, don’t be afraid to dig deeper and understand it all, don’t read the same terms again and again not understanding them like I did with ICYMI.
Bootstrap 3 Responsive Button Groups
Tags: css, bootstrap, bootstrap3
Published: 2020-01-24 19:21:54

---
title: Bootstrap 3 Responsive Button Groups
published: true
date: 2015-08-12 17:28:01 UTC
tags: css, bootstrap, bootstrap3
canonical_url: https://kylekeesling.dev/posts/2015/08/bootstrap-responsive-btn-group
---

Ever been disappointed/pissed off with how Bootstrap handles (read ignores) button formatting on smaller screens? Check this out:

{% gist https://gist.github.com/kylekeesling/b7d2571de44f2ad8f5cf %}

Makes this: ![](https://kylekeesling.dev/images/2015/08/bs-btn-before.jpg "Before :(")

Look like this: ![](https://kylekeesling.dev/images/2015/08/bs-btn-after.jpg "After!")

[Permalink ∞](https://kylekeesling.dev/posts/2015/08/bootstrap-responsive-btn-group)