teleren/devto huggingface dataset:
Don't make me hack your software
Tags: hacks, osx
Published: 2019-04-17 12:23:44

---
title: Don't make me hack your software
published: true
tags: 
- hacks
- osx
cover_image: https://i.imgur.com/B6lhau5.jpg
canonical_url: https://detunized.net/posts/2019-04-17-dont-make-me-hack-your-software/
---

I got a new corporate VPN tool the other day. It's called [Pulse Secure](https://www.pulsesecure.net/). It worked fine, thank you very much, no complains there. But then I tried to quit

![exit](https://i.imgur.com/Nf6gDQ1.png)

and I got this

![disallowed](https://i.imgur.com/f8rI72s.png)

That pissed me off right then and there. Why would any remote admin tell me what to do on my local machine? Even if it's a company machine. When I do not use the VPN or maybe I'm not even connected to any WiFi, why should I have this running? It's just silly to try to prevent me from doing something on the machine where I have the root access. When this gets pushed onto a developer's laptop (as opposed to an accountant or an HR clerk) it simply becomes a challenge.

It has no impact on the security of the machine or the corporate network when it's simply running in the background. This is not anti-virus software. It has an impact on the battery life and other resources like RAM and CPU though. And I need those. It's exactly this type of programs that don't exit, hang around and prevent me from running yet another Electron app on my laptop. Sometimes one is not enough, you know.

I guess I'd have to get my hands dirty instead of doing something I was actually going to do. Simply killing it from the command line didn't work. It just starts over. Investigation it is, then.

First, I took a quick look at the list of the open files from the Activity Monitor. There I found a log file (bottom row):

![am](https://i.imgur.com/2g86MNQ.png)

The tool developers were very kind and dumped about half a meg of stuff on every restart cycle into the log. So it's wasting my disk space as well then. Amongst thousands of lines, I found a reference to `/Library/Application Support/Pulse Secure/Pulse/connstore.dat`. It sounded promising. After poking around in that file and trying this and that, I found a parameter that is responsible for that.

```js
ive "921sn438-qoo8-4pp4-85p7-68q5s2592o32" {
    ...
    connection-policy-override: "false"
    ...
}
```

When this parameter is changed to `true` and the tool is restarted I was able to quit. Voilà!

![done](https://i.imgur.com/xfEeC0C.png)

Yes, I do.

And here the script that automates the whole thing:

```bash
cd '/Library/Application Support/Pulse Secure/Pulse'
sudo sed -i '' \
      s'/connection-policy-override: "false"/connection-policy-override: "true"/' \
      connstore.dat
sudo killall PulseTray 'Pulse Secure' dsAccessService
```

Dear developers and sysadmins, please don't do that again. You're just wasting everybody's time. Rather put your efforts into making the software more reliable, less resource hungry, more secure.

*Originally published on [detunized.net](https://detunized.net/posts/2019-04-17-dont-make-me-hack-your-software/)*
What defines a good programmer
Tags: programming, programmer
Published: 2019-04-17 11:04:50

---
title: What defines a good programmer
published: true
description: 
tags: programming,programmer
---


I always found myself asking this question "What define a good programmer?"
I ask lots of people and the answers vary, they 're all correct for certain aspects


> Good programmer is someone who has a solid knowledge of the "how-to" both in theory and in practices. Understanding customer requirements clearly and having the vision to fulfill it through dedication and execution!
  
> Good programmer is one who has in-depth knowledge of one particular major and wide understanding of many things else
  
> Algorithm

One of the answers I really like is **responsibility**

Thanks Uncle Bob for pointing it out in his experience sharing "The Professional Programmer" in the book [97 Things Every Programmer Should Know: Collective Wisdom from the Experts](http://www.amazon.com/Things-Every-Programmer-Should-Know/dp/0596809484)


> The single most important trait of a professional programmer is personal responsibility. Professional programmers take responsibility for their career, their estimates, their schedule commitments, their mistakes, and their workmanship. A professional programmer does not pass that responsibility off on others.


  * If you are a professional, then you are responsible for your own career
  * Professionals take responsibility for the code they write
  * Professionals are team players
  * Professionals do not tolerate big bug lists
  * Professionals do not make a mess



Although he talks about a professional programmer, my intention in "good programmer" term is the same as that
What is your REST API design / development / testing workflow?
Tags: discuss, api, restapi
Published: 2019-04-17 12:02:53

---
title: What is your REST API design / development / testing workflow?
published: true
tags: discuss, api, restapi
---
How do you design and plan your REST API's? Do you use Swagger or similar for generating documentation and generating stubs? Perhaps you even auto-generate big parts of the code / logic? Which kind of tests do you use? Do you test database interactions? How do you update your REST API if there's a lot of different implementations of the API around? What are your biggest "pain points" when developing or working with REST API's?

There are no wrong answers!
One-command file sharing with upload.express
Tags: showdev, productivity, bash, linux
Published: 2019-04-17 11:40:59

---
title: One-command file sharing with upload.express
published: true
description: Sharing files directly from the terminal
tags: showdev,productivity,bash,linux
cover_image: https://thepracticaldev.s3.amazonaws.com/i/volh41co7llo92n9w2p2.png
---



In this short tutorial, I'm going to present the latest feature we implemented on [upload.express](https://upload.express): a one-command terminal file sharing.

If you want to upload a file in your current working directory, all you have to do is typing the following command:

```bash
curl --upload-file ./file_name.ext https://upload.express/upload/file_name.ext
```

It will return a link to the uploaded file. 

## Creating an alias

Remembering the curl command arguments can take a while. You can simplify the command by creating an alias in your ~/.bashrc or ~/.zshrc file.

Just append the following code at the end of the file:

```bash
upload() {
    if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho upload /path/to/file.md"; return 1; fi
    curl --progress-bar --upload-file "$1" https://upload.express/upload/$(basename $1) | tee /dev/null;
}

alias upload=upload
```

You can now use the command `upload file_path` to share any file.
How many ads is the average user exposed to in a day? 😱
Tags: discuss
Published: 2019-04-17 10:48:53

I like to try out different browsers, and I've been using [brave](https://brave.com/) for about a week now. One thing I really like about it is it blocks unwanted ads and trackers by default and keeps count.

I hadn't really been paying attention to the numbers but they got my attention today. Just six days of using it as my primary browser and already:
* 286 trackers blocked
* 7,907 ads blocked

While I do spend a considerable amount of time on my browser, that's **more than a thousand** ads per day. I don't know but these numbers seem impossible to me. That means, if I wasn't blocking any ads at all, I'd be exposed to more than a thousand ads a day on my laptop alone. That's not counting Spotify (since I don't have a premium subscription), stuff on TV, on my phone...

I'd like to hear the community's input on this. Who else uses Brave? How are your numbers?
Laravel Mix – The Complete Guide
Tags: laravel, laravelmix
Published: 2019-04-17 09:52:59

---
title: Laravel Mix – The Complete Guide
published: true
description: Laravel provides a fluent utility to compile all your frontend assets like stylesheets and scripts called Laravel Mix.
tags: laravel, laravel mix
---

Laravel provides a fluent utility to compile all your frontend assets like stylesheets and scripts called Laravel Mix. In this post, we will find out what is Laravel Mix and how we can use it.

## What is Laravel Mix?

According to Laravel’s Offical Documentation:

 
Laravel Mix provides a fluent API for defining Webpack build steps for your Laravel application using several common CSS and JavaScript pre-processors.

If you have ever tried to use WebPack for assets compilation, you will find out how easy it is with Mix to compile all your assets. You define assets compilation with a single line and it’s preconfigured settings will do the job for you.

In the webpack.mix.js file we will manage all our assets which need to be compiled. You can find this file at the root of the Laravel application.


You can read this full article at [Laravel Mix](https://www.larashout.com/laravel-mix)
The effective engineer (Part-IIIa)
Tags: blog, code, life, programming
Published: 2019-04-26 11:43:21

---
title: The effective engineer (Part-IIIa)
published: true
tags: blog,code,life,programming
canonical_url: https://itscoderslife.wordpress.com/2019/04/17/the-effective-engineer-part-iiia/
---

Again I started reading this book [“The Effective Engineer” by Edmond Lau](https://www.amazon.com/Effective-Engineer-Engineering-Disproportionate-Meaningful/dp/0996128107/ref=sr_1_1?keywords=the+effective+engineer+by+edmond+lau&qid=1554741721&s=gateway&sr=8-1). I noted down these points while reading so that it can be kind of cheat-sheet for myself and others too. I strongly recommend buying the book and reading it at-least once.

The book is divided into 3 parts and my idea here is to write 3 blog posts one for each. So here is the second part of the series. You can read the [Part-I here](https://itscoderslife.wordpress.com/2019/04/08/the-effective-engineer-series-part-i) and [Part-II here](https://dev.to/itscoderslife/the-effective-engineer-part-ii-4p3-temp-slug-5829372).

For Part-III, I am going to do a little different. The third part of this book is considerably a lengthy part especially the second chapter of this part. So I felt to break the final part into 3 sections each for a chapter in the book. Here’s is the first gist first chapter of Part-III.

## PART III – Build long term values

### **Balance quality pragmatism**

Establish a Sustainable Code Review Process  
– Catching bugs or design shortcomings early  
– Increasing accountability for code changes  
– Positive modelling of how to write good code  
– Sharing working knowledge of the codebase  
– Increasing long-term agility

Code reviews: Over-the-shoulder, pair programming, tricky part only review, non-UI review,

Manage complexity through abstraction

How the right abstraction increases engineering productivity:  
– It reduces the complexity of the original problem into easier-to-understand primitives.  
– It reduces future application maintenance and makes it easier to apply future improvements.  
– It solves the hard problems once and enables the solutions to be used multiple times.

Good abstractions should be:  
– easy to learn  
– easy to use even without documentation  
– hard to misuse  
– sufficiently powerful to satisfy requirements  
– easy to extend  
– appropriate to the audience

Automated Testing:  
– Unit test coverage  
– Integration test coverage

Unit test coverage and some degree of integration test coverage provide a scalable way of managing a growing codebase with a large team without constantly breaking the build or the product.

Establish a culture of reviewing code.  
Invest in good software abstractions to simplify difficult problems  
Scale code quality with automated testing.  
Manage your technical debt

 Hope you enjoyed this post.
What ‘use strict’ means for in JavaScript
Tags: general, public, technology, javascript
Published: 2019-08-27 13:05:55

---
title: What ‘use strict’ means for in JavaScript
published: true
tags: General,public,Technology,Javascript
canonical_url: https://khalifa.tn/what-use-strict-means-for-in-javascript/
---

“strict mode”;

It’s a ECMAScript 5 feature that prevents certain actions from being taken and throws more exceptions in a JavaScript code.

The strict mode is necessary if you have a complex code to write. It introduces better error-checking, If you have a calculating algorithm.  
Without this mode you can write console.log(Infinity = 0) and there is no problem with that. This will return 0 as inspected and Error “TypeError: “Infinity” is read-only”

We can use this feature into a function. For example:

> ```
> // Non-strict code... (function(){ "use strict"; // Define your library strictly... })(); // Non-strict code...
> ```

But, if you activate it you’ll see a lot of problems on the console. To avoid that, try to write a clean code.

The post [What ‘use strict’ means for in JavaScript](https://khalifa.tn/what-use-strict-means-for-in-javascript/) appeared first on [C.Khalifa](https://khalifa.tn).
Some Windows Phone 7 development tips
Tags: windows, phone, 7, csharp
Published: 2019-04-17 08:04:52

---
title: Some Windows Phone 7 development tips
published: true
description: 
tags: windows,phone,7,csharp
---

This post was from long time ago when I did Windows Phone 7. Many of the things I learned still apply for today


Welcome back, today I will start writing all stuff, all the secret I 've revealed when developing for Windows Phone 7.  

1. When setting `UIElement`'s `Visibility` to `Collapsed`, the OS set its `Height` to 0. So if you need to have a Height of 0, simply set `Height="0"`, which is faster in term of show time.  

2. When clearing data source, `ListBox` which uses `VirtualizingStackPanel` does not rememeber its last view, whereas `StackPanel` does  

3. `ListBox` which is inside `ScrollViewer` will lose its UI virtualization, even if you use `VirtualizingStackPanel`  

4. Using `GestureListener` incorrectly will cause other `UIElement` to not work, i.e `Slider`, ...  

5. `AdControl`, `ContextMenu` may be a source of memory leak.  

6. Panorama control still enable swiping when there is only 1 `PanoramaItem`, whereas `Pivot` does not.  

7. Pivot control will load the current `PivotItem`, as well as its direct left and right `PivotItem`.  

8. Sometimes SIP keyboard does not show up, check your phone for physical keyboard problem.  

9. There is no way to rate a Song for 3rd app  

10. When emulator rendering has overlap issue, the workaround is to set `LayoutRoot` 's `Background` to a solid color  

11. Supposed you're using `ObservableCollection` bindSource as binding source for `ListBox`. When adding items to bindSource quickly, `ListBox` seems to suppress creating `ListBoxItem` until all items are added. It is [advised to add items in batch](http://blogs.msdn.com/b/rohantha/archive/2010/09/12/silverlight-wp7-list-scroll-with-items-as-image-description-from-web-bing-image-search.aspx)  

12. `WebBrowser` control does not have scroll bar  

13. Using `StoryBoard` when ever possible, because all of its animation is done in Compositor Thread, which leverages GPU  

14. Use `ProgressIndicator` for best performance and UX familiarity  

15. Collapse unimportant `UIElement` to decrease load time, and show them when Page is completely loaded.  

16. Always unsubscribe to event source that  can continue to run when the Page is navigated from, because that may cause memory leak. Examples are timer, `BackgroundAudioPlayer.PlayeStateChanged`, ...  

17. Using file is much faster than Local Database  

18. Remember the limit 260 characters of query string  


Original post https://github.com/onmyway133/blog/issues/156
Adoption of blake2b hashing algorithm
Tags: microbitcoin, blockchain, opensource, cryptocurrency
Published: 2019-04-17 07:47:05

---
published: true
title: Adoption of blake2b hashing algorithm
tags: MicroBitcoin, Blockchain, Opensource, cryptocurrency
canonical_url: https://github.com/MicroBitcoinOrg/MicroBitcoin/commit/070e90283417ba6452dfbaa6521b43c712ab4297
---

Rainforest v2 is running slow and is causing slow syncing at the moment. MicroBitcoin is going to adopt the blake2b hashing algorithm for block indexing and rainforest for the Proof-of-Work.

Check it out [here](https://github.com/MicroBitcoinOrg/MicroBitcoin/commit/070e90283417ba6452dfbaa6521b43c712ab4297).
How to save window size and position in macOS
Tags: macos, window, size, swift
Published: 2019-04-17 07:26:06

---
title: How to save window size and position in macOS
published: true
description: 
tags: macOS, window, size, swift
---

In case `setFrameAutosaveName` does not work, then we need to manually save and load window size and position

I tried all the solutions. It can only saves the position, not the size. So we should do that manually. This is how I do it on my GifCapture app https://github.com/onmyway133/GifCapture

```swift
class MainWindowController: NSWindowController, NSWindowDelegate {

  let key = "GifCaptureFrameKey"

  override func windowDidLoad() {
    super.windowDidLoad()

    NotificationCenter.default.addObserver(self, selector: #selector(windowWillClose(_:)), name: Notification.Name.NSWindowWillClose, object: nil)
  }

  override func awakeFromNib() {
    super.awakeFromNib()

    guard let data = UserDefaults.standard.data(forKey: key),
      let frame = NSKeyedUnarchiver.unarchiveObject(with: data) as? NSRect else {
        return
    }

    window?.setFrame(frame, display: true)
  }

  func windowWillClose(_ notification: Notification) {
    guard let frame = window?.frame else {
      return
    }

    let data = NSKeyedArchiver.archivedData(withRootObject: frame)
    UserDefaults.standard.set(data, forKey: key)
  }
}
```

Original post https://stackoverflow.com/questions/2734888/how-can-i-easily-save-the-window-size-and-position-state-using-obj-c/44721893#44721893
Three problems in mobile web
Tags: mobile, javascript, css
Published: 2019-04-17 07:13:06

---
title: Three problems in mobile web
published: true
description: I will talk about three problems on the mobile web and how to deal with them
tags: mobile, js, css, html
---

![three problems in mobile web](https://thepracticaldev.s3.amazonaws.com/i/3ilm3tpg98727l7ul3ji.png)

##Overscroll

Overscroll in mobile devices is only on windows. And if you have a block that has its own scroll, it, unfortunately, will not work, but for this, too, there was a **solution**:

```
if (this.el.scrollTop <= 0) {
   this.el.scrollTop = 1;
} else if (this.el.scrollTop >= this.el.scrollHeight - this.el.offsetHeight) {
   this.el.scrollTop = this.el.scrollHeight - this.el.offsetHeight - 1;
}
```

##Fixed+Transform

Most likely, everyone is familiar with the problem: if there is a fixed block, and one of his parents applies the transformation, then all the fixed blocks begin to leave.
This is a very sneaky bug that sometimes makes the animation of our mobile interface very bad.

**Solution**: remember the position of the fixed blocks before the transformation and turn them into absolute with the top property.

It's a little complicated, but in general, you can handle it if you need to.

##Safe-insets

Since we are on the mobile web, we have a huge number of devices, one of them is iPhone X with new frames.

What to do if these frameworks at you get out and your interface looks not so beautiful as you wanted?

**Solution**: use this documentation https://ayogo.com/blog/ios11-viewport/

What problems do you know in the mobile web?
git current
Tags: git, devtips, programming, productivity
Published: 2019-05-10 17:37:42

---
title: git current
published: true
tags: git, devtips, programming, productivity
canonical_url: https://blog.chilcutt.com/2019/04/17/git-current.html
---

As an avid `vim` user, I have a weird aversion to ever using the mouse/trackpad to do anything–especially while at the command line. I noticed that one common thing for me to do was to run git branch or git status to see what branch I was on in order to use the branch name in another command. I didn’t like that.

**tl;dr** create a git alias for seeing your current branch:

```bash
$ git config alias.current "rev-parse --abbrev-ref HEAD"
$ git current # displays the current branch
```

The aliased command prints the current branch that you’re on to `STDOUT`:

![](https://cdn-images-1.medium.com/max/2000/1*QvA9ubVXTQwsUIPmiI6hNA.png)

Once we have the alias created, we can do this even more simply:

![](https://cdn-images-1.medium.com/max/2000/1*fK9Yii2QMsIDjsASz5FdOQ.png)

The real beauty of the command is when you use it to compose another shell command. Let’s say I’m about to take on a few complicated and potentially dangerous operations and I want to create a backup branch because I don’t like spelunking the ref list if I can avoid it. I can easily create a backup branch based on the same name now:

![git current composition](https://cdn-images-1.medium.com/max/2000/1*lj8i1we_cR5hvOCh_4pZ4g.png)<figcaption>Useful in a case with a more complicated base branch name...</figcaption>

Or if I realize I’ve gone down the wrong path and need to start over:

![](https://cdn-images-1.medium.com/max/2000/1*SzFFqSLxTPJB43EF2hp3UA.png)

* * *

_Being lazy sometimes sparks some cool ideas for minor tips/tricks/hacks that just make work more enjoyable. What are your favorites?_
Slider or carousel not working when the code is moved to an Angular component in angular 7
Tags: help, angular7, angular
Published: 2019-04-17 06:35:02

---
title: Slider or carousel not working when the code is moved to an Angular component in angular 7
published: true
description:   
tags: #help #angular7 #angular
---

When I am putting Slider HTML code in the angular component slider is not working but when I am putting code directly into index.html it's working fine. Can anyone please help me out? as I am a beginner in angular.
Belkin Extender Setup
Tags: belkinsetup
Published: 2019-04-17 05:10:55

---
title: Belkin Extender Setup
published: true
description: We even have a live chat support system which available 24X7 for providing assistance in the process of <a href="https://www.belkinn300setup.com">belkin setup</a>.
tags: belkin setup
---