teleren/devto huggingface dataset:
Displaying the LoginRadius interface in a pop-up
Tags: html, login, ui, loginradiusinterface
Published: 2020-10-05 10:49:46

---
title: Displaying the LoginRadius interface in a pop-up
published: true
date: 2015-11-09 00:00:00 UTC
tags: HTML,Login,UI,LoginRadiusInterface
canonical_url: 
---

In order to display your LoginRadius Login Interface in a pop-up you can leverage Jquery-ui which is a well documented, easy-to-use library that allows you to handle some common functionality such as pop-up dialogs and other UI features. In this article we go over the steps to…

   
[Read On](https://www.loginradius.com/engineering/blog/displaying-the-loginradius-interface-in-a-pop-up/)
Available devtools for webpack
Tags: node, webpack
Published: 2015-11-06 10:52:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: Available devtools for webpack
slug: available-devtools-for-webpack
date: 2015-11-06 10:52
published: true
tags: 
 - node.js
 - webpack
---

In case the webpack docs ever lose this, here is a list of available devtools. Choose a developer tool to enhance debugging.

`eval` - Each module is executed with `eval` and `//@ sourceURL`.  
`source-map` - A SourceMap is emitted. See also `output.sourceMapFilename`.  
`hidden-source-map` - Same as `source-map`, but doesn't add a reference comment to the bundle.  
`inline-source-map` - A SourceMap is added as DataUrl to the JavaScript file.  
`eval-source-map` - Each module is executed with `eval` and a SourceMap is added as DataUrl to the `eval`.  
`cheap-source-map` - A SourceMap without column-mappings. SourceMaps from loaders are not used.  
`cheap-module-source-map` - A SourceMap without column-mappings. SourceMaps from loaders are simplified to a single mapping per line.  

Prefixing `@`, `#` or `#@` will enforce a pragma style. (Defaults to `#`, recommended)  

Combinations are possible. `hidden`, `inline`, `eval` and pragma style are exclusive.  
i. e. `cheap-module-inline-source-map`, `cheap-eval-source-map`, `#@source-map`
How to speak to the whole world
Published: 2022-07-04 07:39:24

---
title: How to speak to the whole world
published: true
date: 2015-11-05 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2015/how-to-speak-to-the-whole-world/
---

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

Having a website is an easy way to reach people across the globe. This website has reached people in almost every continent.

I have had visitors in each of the following countries.

- United States
- United Kingdom
- Canada
- Germany
- Australia
- India
- France
- Vietnam
- Netherlands
- Poland
- China
- Russia
- Sweden
- European Union
- New Zealand
- Hungary
- Norway
- Spain
- Brazil
- Hong Kong SAR China
- Belgium
- Denmark
- Italy
- Switzerland
- Finland
- Turkey
- Romania
- Singapore
- Israel
- Indonesia
- Serbia
- South Africa
- Lithuania
- Mexico
- Ireland
- South Korea
- Taiwan
- Greece
- Bulgaria
- Ukraine
- Japan
- Austria
- Kenya
- Portugal
- Czech Republic
- Colombia
- Philippines
- United Arab Emirates
- Moldova
- Slovenia
- Malaysia
- Ghana
- Argentina
- Venezuela
- Bangladesh
- Iceland
- Croatia
- Panama
- Belarus
- Slovakia
- Albania
- Kazakhstan
- Algeria
- Puerto Rico
- Thailand
- Estonia
- U.S. Virgin Islands
- Pakistan
- Latvia
- Chile
- Sri Lanka
- Malta
- Costa Rica
- Morocco
- Ethiopia
- Réunion
- Uruguay
- Honduras
- Cyprus
- Tunisia
- Nepal
- Cameroon
- Paraguay
- Gambia
- Peru
- Mauritius
- Bermuda
- Cambodia
- Jersey
- Egypt
- Macedonia

How cool is that! If you know anyone from any country not mentioned above, send them a link to this page and lets see if we can get this blog seen in even more countries.

Only a few years ago it would have been incredibly difficult to communicate your ideas to the whole world, now it is available to everyone at a touch of a button.

The internet has a lot to answer for. On the one hand it is blamed for a decrease of communication between people as they stare at their devices all the time, but on the other hand it has greatly improved communication over larger distances like the use of Skype or the ability to broadcast your ideas on websites and social media.
Optimize jQuery & Sizzle Element Selector
Tags: engineering, jquery
Published: 2020-10-05 10:49:38

---
title: Optimize jQuery & Sizzle Element Selector
published: true
date: 2015-11-05 00:00:00 UTC
tags: Engineering,JQuery
canonical_url: 
---

Almost every active website worldwide uses jQuery, you can check stats here , but using it without optimization might make the DOM very slow. The same goes for other javascript libraries, such as SizzleJS. To ensure the performance of your DOM, you have to follow some best…

   
[Read On](https://www.loginradius.com/engineering/blog/optimize-jquery-sizzle-element-selector/)
Encapsulating console.log with spread operator
Tags: javascript, es2015, es6
Published: 2015-11-04 11:00:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: Encapsulating console.log with spread operator
slug: encapsulating-console-log-with-spread-operator
date: 2015-11-04 11:00
published: true
tags:
 - javascript
 - es2015
 - es6
---
    
[ES6 or ES2015](http://www.ecma-international.org/ecma-262/6.0/) contains lots of goodies. One of them, my favourite, is the spread operator. It "allows an expression to be expanded in places where multiple arguments (for function calls) or multiple elements (for array literals) are expected."

For example, you can combine two arrays like so:

    var start = ['a', 'b', 'c'],
        end = ['d', 'e', 'f'];
        
    var combined = [...start, ...end];
    
    console.log(combined);
    
    // => ['a', 'b', 'c', 'd', 'e', 'f']
    
What I like even more, is that you can do this with function arguments. Let's say we wanted to wrap `console.log` so we can do something funky with it. This can easily be done using the spread operator.
    
    var log = function (format, ...args) {
        if (args.length > 0) console.log(format, args);
        else console.log(format);
    }
    
    log('test');
    log('this is an %s test', 'interpolation');

    // => test
    // => this is an interpolation test
    
This changes things. [Read more at MDN](n-US/docs/Web/JavaScript/Reference/Operators/Spread_operator).

ES7 should also bring object spread operators, so you can do `{ ...initial, ...change }`.
Determine volume location on Docker host
Tags: docker, jenkins
Published: 2015-11-03 08:50:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: Determine volume location on Docker host
slug: determine-volume-location-on-docker-host
date: 2015-11-03 08:50
published: true
tags:
 - docker
 - jenkins
---

Yesterday I was having an issue that I've had before. It stumped me last time and it stumped me again. I just didn't *think* and it cost me too much time.

The problem I was having, a problem I'd had before, is that I run Jenkins in a container with the Docker host socket passed through, so when Jenkins creates containers, they actually run on the host alongside it. This is great, but when you need to directly map files from the workspace to the container, things don't act the way you may expect. 

This is because the host is running the docker commands, Jenkins simply talks to the host via the socket. So those files that are in `/jenkins/jobs/yourjob/workspace/...` won't be in that location on the host.

The way I run Jenkins is that I have a data volume container called `jenkins_data` which as you've guessed, holds the data. In order to use a `-v src:dest` volume map, I'm going to need to locate these files on the host. Docker inspect helps here.

```
    docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/jenkins" }}{{ .Source }}{{ end }}{{ end }}' jenkins
```

Once I have the location, I need to do a search and replace on the `$WORKSPACE` variables which Jenkins exposes. After that, I have the location of the `/jenkins` volume on the host.

```
JENKINS_ROOT=$(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/jenkins" }}{{ .Source }}{{ end }}{{ end }}' jenkins)
JENKINS_PATH=$(echo $WORKSPACE | sed "s|^\/jenkins|$JENKINS_ROOT|g")
```

Now I have `$JENKINS_PATH` I can directly map files or directories in from within my container.

```
docker run d \
    -v $JENKINS_PATH/some/file.js:/var/lib/app/file.js \
    -v $JENKINS_PATH/dir:/var/lib/app/dir \
    someapp
```
Maintain Test Cases in Excel Sheets
Tags: excel, tes
Published: 2020-10-05 10:53:02

---
title: Maintain Test Cases in Excel Sheets
published: true
date: 2015-11-03 00:00:00 UTC
tags: Excel,Tes
canonical_url: 
---

Learn how to maintain test cases in Excel sheets

   
[Read On](https://www.loginradius.com/engineering/blog/how-to-maintain-test-cases-in-excel-sheets/)
Separate Drupal Login Page for Admin and User
Tags: drupal, adminpanel
Published: 2020-10-05 10:53:09

---
title: Separate Drupal Login Page for Admin and User
published: true
date: 2015-10-29 00:00:00 UTC
tags: Drupal,AdminPanel
canonical_url: 
---

Are you afraid of hackers and feel unsafe for admin and front user to login through same area? No need to worry as in this article, I am going to guide you with how to create separate login area for admin. Along with that, I will also provide the required steps to disable…

   
[Read On](https://www.loginradius.com/engineering/blog/separate-login-page-for-admin-and-user/)
How to Get Email Alerts for Unhandled PHP Exceptions
Tags: php, email
Published: 2020-10-05 10:53:16

---
title: How to Get Email Alerts for Unhandled PHP Exceptions
published: true
date: 2015-10-26 00:00:00 UTC
tags: PHP,Email
canonical_url: 
---

This tutorial provides a solution to get email alerts, when a unhandled error occurs. For this tutorial, we are using WordPress. Imagine you created a php application and it’s running fine.  A couple of days later, a user complains about an error which you’re totally unaware of…

   
[Read On](https://www.loginradius.com/engineering/blog/how-to-get-email-alerts-for-unhandled-php-exceptions/)
Swift Variables in Extensions
Published: 2020-09-16 01:31:17

---
title: Swift Variables in Extensions
published: true
date: 2015-10-19 00:00:00 UTC
tags: 
canonical_url: https://luisramos.dev/swift-variables-in-extensions
---

I have recently started working on a project that uses Swift2.0! I have been using Obj-C for the past 3 years, and when Swift came I wasn't one of the early adopters. Problems with the language and with SourceKit always crashing in XCode 6 didn't make for a good dev enviroment. Now with the 2.0 released to the wild, the promisse of open source and XCode 7, Swift is good to go!

One of the first problems I had is one that happens to many iOS developers that use extensions/categories in their projects: How do I add a variable (static or not) to an extension?

Since I seem to always be googling for this one, I'll log it here for future convinience.

### Static Variables

For a static variable, there is actually a really neat way:

```
extension UIView {
  struct Static {
    static var defaultPadding : CGFloat = 16
  }
  func widthWithPadding() -> CGFloat {
    return self.bounds.width + Static.defaultPadding
  }
}
```

Since you can declare structs in an extension, you can use these value objects to hold your static variables and they function the same way as declaring a static variable on the class. If you don't like the extra `Static.` declaration, you can create wrappers using computed variables:

```
extension UIView {
  var defaultPadding : CGFloat { return Static.defaultPadding }
}
```

### Instance Variables

For instance variables the solution is to use the obj-c runtime. You need to create computed variables that get and set an associated object using `objc_getAssociatedObject()` and `objc_setAssociatedObject()`. This is the same approach taken if using it with Obj-C.

```
import ObjectiveC

extension UIViewController {
  struct Static {
    static var MainTitle = "\_MainTitle"
  }
  var mainTitle: String? {
    get{
      return objc_getAssociatedObject(self,&Static.MainTitle) as? String
    }
    set(value){
      if newValue = newValue {
        objc_setAssociatedObject(self,&Static.GenericTitle,newValue as NSString?,.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
      }
    }
  }
}
```

That way you can extend to your heart desire! If you want to understand the difference between structs and classes check out the [Apple docs](appledocs-class-vs-strutc). And to find out more about what kind of magic you can do with obj-c runtime check out [NSHipster post on it](nshipster-objc).
Backing up SQL databases to Azure
Published: 2022-07-08 06:15:21

---
title: Backing up SQL databases to Azure
published: true
date: 2015-10-15 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2015/backing-up-sql-databases-to-azure/
---

I recently read a blog post by [Pinal Dave](http://blog.sqlauthority.com/2015/10/06/sql-server-steps-to-backup-to-windows-azure-storage/) about how you can backup straight to Azure Storage. The procedure he described is only available for SQL Server 2014 or later.

I won’t go into detail of this method as Pinal describes it better than I can, but the basic of it requires setting up credentials and then running a backup command that includes the URL of the storage container on Azure.

Unfortunately I am running SQL Server 2005 so this process will not work for me but it did start me thinking of what ways there might be for me to use.

The next thing I tried was [Microsoft SQL Server Backup to Microsoft Azure Tool](https://www.microsoft.com/en-us/download/details.aspx?id=40740&WT.mc_id=Blog_SQL_Announce_DI). Unfortunately I did not get this tool to work correctly on my setup. However it sounds like a flexible tool that allows compression and encryption of your backup files. This tool redirects your backup files to your Azure Storage so even if I had got it to work correctly it would not have been an ideal solution as I want local copies of my backup files as well.

After this I started to look at powershell again. Following on from my recent success with [powershell](http://www.funkysi1701.com/2015/10/01/copying-settings-to-an-azure-website/) I know how to connect to my Azure account so all I needed to script was copying a file from my server to Azure.

```
Get-ChildItem *.bak -File -Recurse | Set-AzureStorageBlobContent -Container $DestContainer -Force

```

This command gets all the backup files in a directory (the recurse switch looks in sub directories as well) and then pipes them to the Set-AzureStorageBlobContent command. This command uploads them to the storage container defined in $DestContainer. I have added the Force switch so that it will replace any files on Azure which have the same name.

I have only been using this script for the last few days but so far it has been working well. Now if I completely loose all data from the office I can restore from any other location using the data saved on Azure. A great improvement to my disaster recovery policy.
Kali Moto End of Life & Kali Dojo Slides
Published: 2023-08-21 21:18:20

---
title: Kali Moto End of Life & Kali Dojo Slides
published: true
date: 2015-10-15 00:00:00 UTC
tags: 
canonical_url: https://www.kali.org/blog/kali-moto-eol/
---

## Kali Sana Release Aftermath

Kali Linux 2.0 has been out for a couple of months and the response has been great, with well **over a million unique downloads of Kali 2.0** as a testament. Release day was somewhat hectic for us, as we did not anticipate the sheer volume of traffic … which we somehow always underestimate. In the first few days after the release of 2.0, we had **ten times** the download volume of 1.0 in a similar period, back in 2013.

## Kali Moto Repository Purge

We’ve given Kali Moto (1.0) a good two months of grace time and will be purging the unsupported 1.0 distribution files from our repositories in the next few days. If you’re still using Kali 1.0 then it’s definitely time to either upgrade or update:

```
cat << EOF > /etc/apt/sources.list
deb http://http.kali.org/kali sana main contrib non-free
deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
EOF
apt-get update
apt-get dist-upgrade # get a coffee, or 10.
reboot

```

If for some reason you can’t upgrade, we’ve set aside an archive mirror of Kali 1.0, which can be set as follows:

```
cat << EOF > /etc/apt/sources.list
deb http://old.kali.org/kali moto main contrib non-free
EOF

```

Please note, this repository will not be maintained or updated.

## Kali Linux Dojo 2015 Materials

It occurred to us that after the BlackHat and DEF CON conferences, we never made a public announcement regarding the availability of our [Kali Linux Dojo 2015 slides](https://www.kali.org/docs/development/dojo-mastering-live-build/) and notes. The Dojo was **great fun** - we definitely enjoyed showing our brand spanking new Kali 2.0 to the the crowds, who built their own Kali 2.0 ISOs a day before release.

[![](https://www.kali.org/blog/kali-moto-eol/images/dojo-slide-e1444909261539.png)](https://www.kali.org/blog/kali-moto-eol/images/dojo-slide-e1444909261539.png)
ElasticSearch Analyzers for Emails
Tags: elasticsearch, analyzers
Published: 2020-10-05 10:53:23

---
title: ElasticSearch Analyzers for Emails
published: true
date: 2015-10-15 00:00:00 UTC
tags: ElasticSearch,Analyzers
canonical_url: 
---

So last week while I was setting the analyzers on ElasticSearch settings for Email field, it took me some good time to find the perfect custom analyzer for my purpose, so I feel it might be useful to share this with someone who needs it. When a document is indexed, its individual…

   
[Read On](https://www.loginradius.com/engineering/blog/elastic-search-analyzers-for-emails/)
Check if temp table exists in SQL
Tags: sql
Published: 2015-10-14 16:48:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: Check if temp table exists in SQL
slug: check-if-temp-table-exists-in-sql
date: 2015-10-14 16:48
published: true
tags:
 - sql
---

I'm going to start posting some SQL snippets, either things I learn day to day or things that I've had sat around for years.

Today's is a checking if a temp table exists (and then dropping it.)

    IF OBJECT_ID('Tempdb..#tablename') IS NOT NULL
    BEGIN
        -- do something here, like say, drop that table?
        DROP TABLE #tablename;
    END
Social Media Solutions
Tags: socialmedia, sociallogin
Published: 2020-10-05 10:53:33

---
title: Social Media Solutions
published: true
date: 2015-10-08 00:00:00 UTC
tags: SocialMedia,SocialLogin
canonical_url: 
---

Integrating social into your site can drastically improve user engagement with your platform. Below are a few useful solutions and implementation instructions. Social Login Social Login, also known as Social Sign On, Allows you to bypass traditional registration forms and utilize…

   
[Read On](https://www.loginradius.com/engineering/blog/simple-social-media-solutions/)
Copying settings to an Azure Website
Published: 2022-07-08 06:15:45

---
title: Copying settings to an Azure Website
published: true
date: 2015-10-01 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2015/copying-settings-to-an-azure-website/
---

The Software as a Service (SaaS) website that I work on has been sold to lots of clients now. Which is great news.

![](https://storageaccountblog9f5d.blob.core.windows.net/blazor/wp-content/uploads/2015/09/2275.app-1.png?w=550&ssl=1)

However the more Azure websites we have, the more websites we have to administer, especially if like us you take advantage of Traffic Manager which requires multiple website in different regions. Azure has some great options for making this administration easier. One job is adding all the settings onto the Azure portal, so far I have been manually adding these, but a quicker way is to use powershell.

## PowerShell

PowerShell is everywhere these days. You can use it to control Servers, Active Directory and Exchange. So it is no surprise that you can use it to control Azure.

Open a powershell window and run the following command.

```
Get-AzurePublishSettingsFile

```

This command opens an IE window which you can login to Azure and download a file which contains settings that Azure can use. Save the \*.publishsettings file and run the following command.

```
Import-AzurePublishSettingsFile "C:\MyPublishSettings\mysubscriptions.publishsettings"

```

This imports your Azure settings so that PowerShell can do clever things.

```
Select-AzureSubscription -Default "mysubscription"

```

This selects which of your Azure subscriptions to use. Now run the following to import settings into PowerShell.

```
$s = @{"DebugEmailAccount"="test@example.com";"SiteWarningBannerText"=""}

```

And finally run the following to import this settings into the Azure website you specified.

```
Set-AzureWebsite azure-websitename -AppSettings $s

```

Sounds easy doesn’t it. Well it is. The hardest part is getting the settings in the correct format to be imported but this is only string manipulation.

For my project I already have a build script which populates a settings.config file with all these settings, so I have just duplicated this to create a settings.config.importtoAzure file. Next time I have a website to create, I can create it on Azure and run the above script, pasting in the settings file that my build has already produced for me.

This only scratches the surface of what you can do with Azure and PowerShell, hopefully I will do far more in the future.
vimshellで文字コードを制御する
Tags: vim
Published: 2015-05-11 02:35:00

---
title: vimshellで文字コードを制御する
published: true
tags: Vim
date: 20150511T02:35Z
canonical_url: https://qiita.com/shiena/items/3b3f325e15c864936bec
---
# はじめに

Windowsのコマンドプロンプトに機能不足を感じるvimmerにとって[vimshell](https://github.com/Shougo/vimshell.vim/)は頼もしい存在です。
ですが、GitやGoのようにUTF-8を出力するコマンドでは文字化けしてしまいます。
そんな場合の対処方法を紹介します。

## exeのencodingオプション

他のコマンドを実行する`exe`内部コマンドに`--encoding`オプションがあり、ここでコマンドが出力する文字コードを指定できます。
指定できる文字コードはiconvに準拠しています。

**使用例**

```sh
$ exe --encoding=utf-8 git log
```

以下のように`~/.vimshrc`にaliasを定義してもよいでしょう。

```sh:~/.vimshrc
alias git='exe --encoding=utf-8 git'
```

## g:vimshell_interactive_encodings変数

`g:vimshell_interactive_encodings`変数はキーにコマンド名、値が文字コードの辞書で、キーと一致したコマンドが実行されるとその出力は値で指定された文字コードで変換されます。
また、キーに`/`が含まれているとコマンド名ではなくコマンドのパスに含まれるかチェックされます。

Windowsの場合だけ以下の初期値が設定されています。

| キー | 値 |
|-----|----|
|`/MinGW/bin/`|`utf-8`|
|`/msysgit/bin/`|`utf-8`|
|`/cygwin/bin/`|`utf-8`|
|`gosh`|`utf-8`|
|`fakecygpty`|`utf-8`|

## 活用例

### Windowsの場合

SourceTree経由でインストールしたgitを使っているので次のように設定しています。
このようにディレクトリを指定すると`ls`や`find`など他のコマンドも一括指定できます。

```vim:.vimrc
let g:vimshell_interactive_encodings = {
\'/Users/'.$USERNAME.'/AppData/Local/Atlassian/SourceTree/git_local/':'utf-8',
\}
```

### OSXの場合

OSXのデフォルト文字コードはUTF-8なので問題なさそうに見えますが、ファイル名だけは改変NFDであるUTF-8-MACが使われているので、ファイル名を出力する`ls`や`find`で濁点、半濁点を含むファイル名の表示がおかしくなります。
そこで少し乱暴ですが`/`に`utf-8-mac`を指定してしまいます。
また、`g:vimshell_user_prompt`のカレントディレクトリ名も同様に変換します。

```vim:.vimrc
let g:vimshell_interactive_encodings = {
\'/':'utf-8-mac',
\}
let g:vimshell_user_prompt = 'iconv(fnamemodify(getcwd(), ":~"), "utf-8-mac", "char")'
```
Types of Authentication in Asp.Net
Tags: engineering, authentication, aspnet, multipass
Published: 2020-10-05 10:53:40

---
title: Types of Authentication in Asp.Net
published: true
date: 2015-10-01 00:00:00 UTC
tags: Engineering,Authentication,AspNet,Multipass
canonical_url: 
---

Learn types of Authentication in Asp.Net and how it plays an important role in any system.

   
[Read On](https://www.loginradius.com/engineering/blog/alternate-authentication-asp/)