teleren/devto huggingface dataset:
How to share your visual studio code settings and extensions
Tags: vscode, productivity
Published: 2019-08-02 13:19:45

---
title: How to share your visual studio code settings and extensions
published: true
tags: vscode, productivity
canonical_url: http://shanalikhan.github.io/2016/09/02/how-to-Share-visual-studio-code-settings.html
series: Code Settings Sync
---

You can now share your visual studio code settings with your users or team members, you will just edit the settings or upload your extensions, it will automatically download in your users computers.

Make sure you have Github Access Token. You need to [Configure](http://shanalikhan.github.io/2015/12/15/Visual-Studio-Code-Sync-Settings.html) it if its not setup.

### Creating GIST To Share

By default extension creates the secret GIST so only you can see it from your github page. So you need to create the public GIST so anyone can see your GIST contents.

> By command : Sync : Advance Options > Share Settings with Public GIST

It will remove your current Gist and create new public Gist and upload the settings. You can share your GIST ID with other users so they can download those settings using your gitHub Gist.

### Downloading The Settings From Shared GIST

Settings Sync, by default ask for Github Token to download the settings, but if you are download from Public Gist the token isnt required. You need to turn on the public Gist download mode as:

> By command : Sync : Advance Options > Download Settings from public Gist.

Now when you download the settings, it will download from the Public Gist that is avaiable in Code Settings file.

Extension dont allow users to edit or change the Gist of other Users.

Feel free to join our channel for discussion or comment below.[![Drawing](https://shanalikhan.github.io/img/slack.PNG)](https://join.slack.com/t/codesettingssync/shared_invite/enQtMzE3MjY5NTczNDMwLTYwMTIwNGExOGE2MTJkZWU0OTU5MmI3ZTc4N2JkZjhjMzY1OTk5OGExZjkwMDMzMDU4ZTBlYjk5MGQwZmMyNzk)
How to use ssh as a socks5 proxy with autossh
Tags: privacy
Published: 2018-10-14 12:57:42

---
title: How to use ssh as a socks5 proxy with autossh
published: true
tags: privacy
canonical_url: https://wildauer.io/proxy-sh/
---

To randomize my ssh tunnels, I use a small script. This script looks at my `~/.ssh/config` for hosts with the comment `#socks5` after the `Host` and picks one out. I use `autossh` to maintain the connection.

> AUTOSSH(1): autossh is a program to start a copy of ssh and monitor it, restarting it as necessary should it die or stop passing traffic.

```
#!/bin/bash

# ssh user config (http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config)
SSH_CONFIG=~/.ssh/config

# local port
PORT=8888

# export pid to file
export AUTOSSH_PIDFILE=/tmp/proxy.pid

# array with hosts from SSH_CONFIG.
# append "#socks5" at the end of the Host line.
# Example: "Host yourHost #socks5"
eval HOSTS=( $(awk '/^Host(.*?)#socks5$/ {print $2}' ${SSH_CONFIG}) )
N=1
for index in `shuf --input-range=0-$(( ${#HOSTS[*]} - 1 )) | head -${N}`
do
        echo -en "Host: ${HOSTS[$index]} Port: ${PORT}\n"
        # using autossh - Automatically restart SSH sessions and tunnels
        AUTOSSH_DEBUG=1
        AUTOSSH_GATETIME=0
        autossh -M 20000 -N -D ${PORT} ${HOSTS[$index]}
done
```

I start the script automatic on boot with [Supervisor](http://supervisord.org/)

`/etc/supervisor.d/proxy.ini`:

```
command=/path/to/proxy.sh
autostart=true
autorestart=true
startretries=3
user=YOURUSERNAME
stderr_logfile=/var/log/proxy.log
stdout_logfile=/var/log/proxy.log
```

Now you can set 127.0.0.1:8888 as a proxy when your application support SOCKS5
Hacking Together a Simple Graphical Python Debugger
Tags: python, debugger, webdev, sofi
Published: 2019-07-05 03:15:16

---
title: Hacking Together a Simple Graphical Python Debugger
published: true
tags: python, debugger, web development, sofi
canonical_url: https://tryexceptpass.org/article/hacking-together-a-simple-python-debugger/
cover_image: https://tryexceptpass.org/images/simple-python-debugger.jpeg
---

##### Zero-to-Debugging in 15 mins

You don’t realize the value of a debugger until you’re stuck working on a hard-to-visualize problem. But once you fire up a development environment with decent debugging capabilities, you’ll never look back.

Want to know where you’re at in code execution? What’s taking so long? Just pause it and check.

Wonder what value is assigned to that variable? Mouse over it.

Want to skip a bunch of code and continue running from a different section? Go for it.

Sometimes `print(variable_name)` is just not enough to give you an idea of what’s going on with your project. This is when a good debugger can help you figuring things out.

[Read on ...](https://tryexceptpass.org/article/hacking-together-a-simple-python-debugger/)
The Anatomy of an Expertise
Published: 2016-08-30 16:37:39

---
title: The Anatomy of an Expertise
published: true
description: The fascinating process learning new things  
cover_image: http://orig12.deviantart.net/0bfd/f/2015/117/a/9/path_of_wisdom_by_andreasrocha-d80wb3y.jpg
---

Not too long ago, I had not thought much about Content Delivery Networks. Some time before that, I had never even heard the phrase. A Content Delivery Network, CDN for short, is defined as "a globally distributed network of proxy servers deployed in multiple data centers", but the technical definition is not as useful to me as my conceptual understanding of it as a technique for cutting down on network latency. I started learning about CDNs as I became curious about web performance and ascertained that they were a critical piece I had taken for granted before.

It fascinates me that, as I learn more and become more interested, I find myself doing extra research into the barriers of this technology, learning how high-frequency traders take some of these concepts to their absolute extremes, reading about networking history such as the first telegraphs, and piecing together what is becoming an expertise in the subject. That word makes me nervous, as I still am very early in this process, too early to know if I will stay motivated to go deeper or eventually lose interest and become fascinated by some other concept. I am not a yet a expert, not even close, but I am rounding into one gradually. I am using my interest in the subject to dive more deeply into other technical concepts like peer-to-peer networking and thinking about that technology in ways I could not have appreciated without a compounding accumulation of prowesses.

I do not know what my future holds, but I as I learn more, I come up with my own opinions about networking possibilities, and possible innovations. At my present stage, I do not have the know-how to differentiate between clarity and naivetÃ© and I will need to do much more research before any of this solidifies. When I take a moment to appreciate my current wisdom and contrast it with my past and potential future, it takes my breath away. My past-self was wholly uninterested in everything I am describing here, and yet now it fascinates me. I am privy to the continuity of the whole situation which lets me make sense of it all, but fundamentally it is wild how new learnings can break down mental barriers.

A past self would also have jumped right into the "making" part of this whole equation. I have, however, matured to the point where I would rather apply new information to my current problems and be okay with letting the future unfold in a more tempered manner. I already have a lot going on and I cannot jump head first into the vast ocean of networking technology. But I can keep learning, keep being fascinated and grow my knowledge in ways that will allow me to reflect like this again in the future.

###### Cover Image Credit: [Andreas Rocha](http://andreasrocha.deviantart.com/art/Path-Of-Wisdom-485236798)
XojoTalk 028 – Email is Not a Project Management Tool
Tags: productivity, technology, podcast, saas
Published: 2018-01-03 20:17:46

---
title: "XojoTalk 028 – Email is Not a Project Management Tool"
published: true
tags: Productivity,Technology,Podcast,SaaS
canonical_url: https://blog.xojo.com/2016/08/30/xojotalk-028-email-is-not-a-project-management-tool/
---

Join Paul as he talks with Susan Fennema of [Beyond the Chaos](http://beyondthechaos.biz). Susan helps small business owners control their lives through better process, organization, and structure of the business operations and projects. There is some great advice in this episode that should apply to almost everyone!

Download the [MP3](http://cdn.xojo.com/Podcasts/XojoTalk-028.mp3).


## Show Notes

- [Beyond the Chaos](http://beyondthechaos.biz)
- [Favorite SaaS tools](http://beyondthechaos.biz/saas-tools/)
- [Improving your sales process](http://beyondthechaos.biz/sales_process_vs_income/)
- [Value Pricing](http://beyondthechaos.biz/how-to-complete-a-value-based-project-interview/)
 ![](http://feeds.feedburner.com/~r/xojotalk/~4/KAB6xQnKTas)
Connect to Purdue CS Files Using SSHFS
Published: 2020-06-14 22:01:29

---
title: Connect to Purdue CS Files Using SSHFS
published: true
tags: 
canonical_url: https://jayhankins.me/2016/connect-to-purdue-cs-files-using-sshfs/
---

Here’s a quick tutorial on how I access my Purdue CS files remotely so that I can still use all my preferred local development tools, like Sublime Text and my shell customizations.

* * *

## Install Required Software on Mac OS X

I assume you already have [Brew](http://brew.sh/ "Brew Website") and [Homebrew Cask](https://caskroom.github.io/ "Homebrew Cask Website") installed on your Mac.

1. 

Use cask to install [osxfuse](https://osxfuse.github.io/ "FUSE for OS X"):

```
brew cask install osxfuse
```

2. 

Use cask to install `sshfs`:

```
brew cask install sshfs
```

## Mount Your Remote Directory

1. 

Run the following command to mount the directory to your local machine:

```
sshfs <username>@data.cs.purdue.edu:/homes/<username>/ ./desired_mountpoint -o auto_cache,reconnect,defer_permissions,noappledouble
```

For example:

```
sshfs hankinsj@data.cs.purdue.edu:/homes/hankinsj/ ./purdue -o auto_cache,reconnect,defer_permissions,noappledouble
```

2. 

Now change to the directory you mounted in. You should see the remote files in the directory, and you can interact with them just as if they were local files on your Mac.

## Unmount Your Remote Directory

1. 

Run the `umount` command to unmount the directory:

```
umount ./desired_mountpoint
```

For example:

```
umount ~/purdue
```

* * *

Of course, this works on any system that supports SSH, but the case of connecting to Purdue servers to work on projects from home has been especially convenient during my time as a CS student. I’ve found it to be a bit flaky depending on your network connectivity, and it rarely resumes the mount from a suspend gracefully. However, it’s a really convenient way to access your files remotely while still developing locally.

Are you a Purdue CS student that stumbled upon this? Did it help you? Did something not work? Let me know [@jay\_hankins](//twitter.com/jay_hankins)!
Go-odbye
Tags: go, programming
Published: 2018-09-04 08:45:36

---
title: Go-odbye
published: true
tags: Go, Golang, Programming
cover_image: https://domenicoluciani.com/assets/images/covers/twitter.jpg
---

One of the worst things that can be happens to a twitter user is surely to be unfollows but how to discover who unfollow you ? To solve this problem I create an ad-hoc offline and commandline tools to do that.

## How does it work ?

It is wrote entirely in Go, [read more](https://domenicoluciani.com/2016/08/29/go-odbye.html)!
DZone
Published: 2022-05-25 20:32:11

---
title: DZone
published: true
date: 2016-08-25 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2016/dzone/
---

For a while now I have been sharing some of my blog posts on the [Dzone](https://dzone.com/) website.

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

The Dzone website allows users to submit links to content and I have been submitting the content I have created on this website. This is how Dzone describes themselves:

With over 1 Million members, DZone.com is one of the web’s largest communities and publishers of technical content for software professionals. Developers from all over the world come to DZone for the latest and best content to hone their skills and advance their careers.

Well this week I have been invited to join the [MVB](https://dzone.com/pages/mvb) (Most Valuable Blogger) programme. The hope is that more of my readers will find my content from the DZone website.

The DZone team will soon start sharing my content on the DZone website and I hope this will result in even more people reading what I have to say.

If nothing else this is clearly telling me that my blog is making a difference, people are taking note of me and what I have to say. I need to keep going and keep writing articles and be more consistent.
The Flawed Goal of Uniformity in Software Development
Published: 2016-08-24 18:12:26

---
title: The Flawed Goal of Uniformity in Software Development
published: true
description: Rethinking "the way it has always been done"
cover_image: http://i.imgur.com/bJyH9tC.jpg
---

Some days I produce an incredible amount of productive coding work. Some days are not even close. I would guess that the eighty-twenty rule applies pretty well to my own productivity and that of the developers and organizations I have observed. Despite this, our business models expect some notion of uniform input that fights against the nature of creative work like software development. We artificially enforce an average work day which has its roots in assembly-line work. We assign homogenous sprint cycles which do not seem to take into account the radical inconsistencies that arise naturally in one's flow, that do not allow wiggle room for personal issues or dashes of motivation.

When we are expected to produce uniform output, it can be demotivating on both ends of the spectrum. Workers are forced to put their butts in seats when things are not working and, out of the expectation of uniformity, are less likely to put in an inspired late-night run, for worry of establishing a new norm.

While these procedures have some historical purposes, they strike me as inefficient and irrational. We are still in a pre-[Moneyball](https://www.amazon.com/gp/product/0393324818/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0393324818&linkCode=as2&tag=dev02f-20&linkId=1ad32de97621c2b9e7f48f132223d02c) era of work and even the "innovative" technology sector seems uninterested in "disrupting" accepted best practices.

I have little structured management experience so I am inherently naive, but I am sure that changing industries are not modeling their work procedures to the problems at hand, which is to their detriment. Changes tend to be evolutionary when they could stand to be revolutionary. There are, of course, tradeoffs that make these revolutionaries impractical. Doing anything differently involves ridicule you would not otherwise suffer. An organization takes on risk in doing things differently. So while the current situation is inefficient, anything outside of the norm could land anywhere on that spectrum. There are also issues with getting any new hire up to speed on new practices that do not exist if you just do what everybody else does. This is why all 32 teams use the same punt formation.

In an environment where the practitioners of a growing craft, like software development, demand a high salary if they are experienced, it is worth differentiating an organization's procedures in ways that attract a certain type of skilled practitioner. I believe this is both better for business outcomes and developer happiness. These will go hand-in-hand in the long run. Despite the potential tradeoffs, it is worth thinking way harder than we do about "the way we have always done it."

###### cover image: [Detroit Institute of Arts](http://www.npr.org/2015/03/16/393393697/in-detroits-rivera-and-kahlo-exhibit-a-portrait-of-a-resilient-city)
Travis CI script for your Swagger/OpenAPI Specification
Tags: api, openapispecificatio, github, travisci
Published: 2019-04-15 23:40:05

---
title: Travis CI script for your Swagger/OpenAPI Specification
published: true
tags: api,openapi-specificatio,github,travis-ci
canonical_url: https://medium.com/@hossainkhan/travis-ci-script-for-your-swagger-openapi-specification-13ba94e7bfdc
---

Recently I have been working with swagger in a project. [Swagger 2.0](http://swagger.io/) has become open standard and now referred as [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification) _(OAS)_.

I also love **medium.com** , so when I saw their API doc was hand written in plain text, I thought it would be good exercise to convert it to OpenAPI Specification format. The result is [https://github.com/amardeshbd/medium-api-specification](https://github.com/amardeshbd/medium-api-specification)

Now, recently I’ve started adding [**Travis**](https://travis-ci.org/) Continuous Integration (CI) script for most of my recent projects. So, I wanted to add CI support for this OAS project.

### Adding Travis CI build support for OpenAPI specification

Googling for this specific topic didn’t bring much content. I wanted to keep the scrip simple and use existing validator provided by [swagger-validator-badge](https://github.com/swagger-api/validator-badge) web service _(NOTE: There are over dozens of validator in different languages built by the community — see_ [_http://swagger.io/open-source-integrations/_](http://swagger.io/open-source-integrations/)_)_.

Here are the key elements used for CI:

\* shUnit2 — for writing unit tests in shell script. This is downloaded via Travis build config _before_ the build begins.

{% gist https://gist.github.com/amardeshbd/9920439e0e1f4889e4b071460498d7eb %}

\* validator-badge — online web-service to validate OpenAPI specification file

{% gist https://gist.github.com/amardeshbd/6ba8116710c789b68608e9cf232e82e7 %}

I hope somebody finds this useful for their project.
Three Ways To Add an ActionListener In Java Swing
Tags: java, swing, guide
Published: 2019-08-19 02:32:52

---
title: Three Ways To Add an ActionListener In Java Swing
published: true
tags: Java,Swing,Guide
canonical_url: https://anthonybruno.dev/2016/08/20/Three-Ways-To-Add-ActionListener-In-Java.html
---

When building GUI’s, the interface needs a way to listen and respond to events. Events are triggered when the user interacts with the GUI, such as pressing buttons and inserting text. One of these types of events in Java Swing is the ActionEvent. A commonly used component that generates a ActionEvent is a JButton, which is simply a button that produces an event when pressed. This article serves to explain three different ways an ActionListener can be added to a component.

## Component as ActionListener

This is when the component itself listens for actions. To do this, simply implement the ActionListener interface in the component, for instance:

```
public class ButtonExample extends JButton implements ActionListener {

    public ButtonExample() {
        addActionListener(this);
    }

    public void actionPerformed(ActionEvent ae) {
        //handle event here
    }

}
```

Components implementing the ActionListener therefore become both the source and listener. You would want to use this method if events are relatively simple and internal (e.g. not connecting multiple components).

This method of adding an ActionListener breaks the [Single responsibility principle](https://en.wikipedia.org/wiki/Single_responsibility_principle) as the component is both responsible for creating events and handling it.

## Inner ActionListener

This method is when you use the ‘new’ keyword to create a new ActionListener for each component.

```
component.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent ae) {
            //handle event here
        }
});
```

This implementation is great for simple listeners and it also separates the listener from the component. Avoid this if your trying to add ActionListeners to sub-components, for example, sub-components of a JPanel. This can result in messy code as every component is creating it’s own version of an ActionListener.

## Separate ActionListener

This technique requires you to create a separate class that implements ActionListener. A component that needs this ActionListener simply creates a new instance of this class and adds it.

```
public class ButtonExample extends JButton {
  
      public ButtonExample() {
          addActionListener(new ButtonHandler());
      }   
}
  
public class ButtonHandler implements ActionListener {
      public ButtonHandler() {
  
  	  }   

      public void actionPerformed(ActionEvent ae) {
          //handle event here
      }   
}
```

This is the cleanest way to add an ActionListener. It separates the component from the listener, creates a reusable listener that can be used across different classes and allows for complex interactions between components.
The psychological battle of big refactorings
Published: 2016-07-24 18:25:55

<p>We usually talk about refactoring code with the same kind of pedantic approach we do with all other kinds of software writing. We come up with recipes to abstract, break apart, and clarify. We fold these techniques together into larger ideas and catchier names like the Mikado method, the Big Bang approach, divide and conquer, or strangulation. OK, maybe not all of them are catchy.</p>
<p>But, with all these strategic tools in our belt, a big refactoring still requires a tremendous amount of mental stamina and perseverance. In fact, what really makes it difficult has more to do with our own psychology than it does with the shape of the code itself.</p>
<p>In most big refactorings, we don&rsquo;t have the luxury of a complete rewrite. Features need to be built; bugs need to be squashed. Our only option is to push in-flight production code toward a new direction gradually. We make small changes continuously, seizing opportunities to remold portions of a system when the time is right.</p>
<p>And therein lies the rub. Rehabbing code that still needs to serve its customers often requires some extra weight to allow the new code in, while still holding onto the old code we&rsquo;ve yet to clean up.</p>
<p>A refactoring might necessitate creating ephemeral objects and methods solely so we can fit the old temporarily with the new. While these extra pathways are being created, the code will feel like it&rsquo;s bulging at the seams&mdash;because it <em>is</em>. A big refactoring is rarely as hygienic as swapping an ugly piece for a pretty piece. It often means putting in a whole lot of intermediate structures; the ugly-but-necessary scaffolding to keep our patient able to work on his daily chores while still under the knife.</p>
<p>In any big refactoring, you have to cope with two dissonant ideas: trying to make a codebase better and the reality that&mdash;in the midst of it, the code may actually feel a whole lot worse. This is, perhaps, the real reason that the whole process feels daunting. Every decision in a refactor weighs the short-term pain with the future payoff. And, often, the short-term pain convinces us that today is not the day to begin.</p>
<p>However, once you&rsquo;ve accepted this, a big refactoring becomes a lot more tolerable. You aren&rsquo;t fighting the devil on your shoulder who wants to scold you for the off-course moves you&rsquo;re making now to get to tomorrow&rsquo;s pot of gold. Eventually, we reach that glorious day where the old abscesses can be completely removed and our new code is in full control. But, until then, the battle is as much in our minds as it is in our code.</p>
<p><em>Re-published with permission from <a href="http://lifeimitatescode.com/the-psychological-battle-of-big-refactorings">Life Imitates Code</a>.</em></p>