Windows 10: WLAN/Netzwerk von „Öffentliches Netzwerk“ auf „Privates Netzwerk“ umstellen

Published 2017-03-30, 13:20

Mit Windows 10 hat sich (mal wieder) geändert, wie man sein WLAN/Netzwerk von „öffentlich“ auf „privat“ umstellen kann. Das ist relevant weil die Windows Firewall zwischen diesen beiden Klassen von Verbindungen unterscheidet und manche Verbindung aus Versehen falsch kategorisiert werden kann. Also muss man es ändern. Nur wo?

Die Einstellung findet sich nun in den „Einstellungen“ (bzw. „Eigenschaften“, je nach dem wo man es findet) des jeweiligen WLANs/Netzwerkes und wird dort als „Dieser PC soll gefunden werden“ bezeichnet. Ist dieser Schalter auf „Ein“, wird die Verbindung als „privat“ gehandhabt, bei „Aus“ eben als „öffentlich“.

Logisch, oder? *augenroll

Viele weitere Möglichkeiten finden sich hier: https://www.deskmodder.de/wiki/index.php?title=Netzwerk_%C3%B6ffentlich_privat_%C3%A4ndern_Windows_10

git: How to rewrite history on commits that you already pushed to the remote/origin

Published 2017-02-14, 18:42

(Written October 2013)

Let’s phrase this another way:
How to rewrite commits that are already on Github?
Ho to clean up commits that I already synced?
How to rewrite public history on git?

As you probably know git is much more flexible with branches, commits and all that stuff than other CVSs like SVN were. Commits are done locally and more like local snapshots that still can be changed, where commits in SVN are directly on the server/repository and can’t be changed. So there are lot’s of tutorials that explain how all this works:

But the one thing all these instructions don’t tell you, is what to do when you already synced (pushed) these commits to the remote origin. We only get quotes like these:

Once you have published/pushed your work to shared repositories, we very much recommend against going through post-production with it. That is known as rewriting public history and in general requires telling everyone of your failings as a developer so that they can do the necessary work to recover on their side.

A word of caution: Only do this on commits that haven’t been pushed an external repository. If others have based work off of the commits that you’re going to delete, plenty of conflicts can occur. Just don’t rewrite your history if it’s been shared with others.

Don’t include any commit you’ve already pushed to a central server — doing so will confuse other developers by providing an alternate version of the same change.

or my favorite one from the GitHub documentation:

Warning: It is considered bad practice to rebase commits which you have already pushed to a remote repository. Doing so may invoke the wrath of the git gods.

There are good reasons for this if you work with other people.

Obviously this doesn’t help, when you want to rewrite public history. There are lots of cases where you want to do that, especially if you are the only committer to a project and there is noone else to consider.

Before you start playing around with rebase, it’s probably a good idea to make a backup of your current state to a branch:
$ git branch backup-branch
Then if something goes horribly wrong with you workign copy you can just get the old state back:
$ git reset --hard backup-branch

Then you can continue doing the rebase like it is described in one of these tutorials:

And after all that, the magic thing to do is this:
git push --force origin master

By the way, the sources I finally found for this, after fighting for several days, were these:

API Load Testing

Published 2017-02-14, 13:27

Last year I not only needed to log JavaScript errors but also find a way to load test a REST(ish) API. Again some bookmarks that resulted out of my research on how to load test an API:

Software as a Service

Articles / Blog Posts

JavaScript Error Tracking and Logging

Published 2017-02-14, 13:19

Last year I needed a solution for logging and tracking errors in a JavaScript application and spent some time researching services and tools to resolve this need. This is a cleaned up dump of my bookmarks that resulted out of this research:

SaaS

Google Analytics

self-hosted

hacky

Cordova/Ionic support

As I needed it for a Ioinic app and didn’t really have a budget I went with jslog.me which worked totally fine for my needs.

Postman: Use result data in test scripts (and save to environment)

Published 2015-03-10, 21:41

Just use ‚request‘ in the test script:

Makes so many things easier :)

Postman (REST Client) Tests

Published 2014-10-31, 16:04

### VORBEREITUNG ###

// save response in env
var data = responseBody;
postman.setEnvironmentVariable("data", data);

// parse value from json and save in env
var data = JSON.parse(responseBody);
postman.setEnvironmentVariable("device_id", data.id);

// parse array from json and safe as string and save in env
var data = JSON.parse(responseBody);
var product = JSON.stringify(data[0]);
postman.setEnvironmentVariable("contentful", product);

// parse array from json, change value, and safe as string and save in env
var data = JSON.parse(responseBody);
data.locale = "en_US";
var device_update = JSON.stringify(data);
postman.setEnvironmentVariable("device_update", device_update);


### TESTS ###

// test resposonse code
tests["Status code is 200"] = responseCode.code === 200;

// test if response is empty
var data = JSON.parse(responseBody);
tests["Transaction list is empty"] = data.length === 0;

// test if body contains value
tests["Body contains string" + environment.device_id] = responseBody.has(environment.device_id);

// test exact values of json
var data = JSON.parse(responseBody);
tests["transaction.id is " + environment.transaction_id] = data.id === environment.transaction_id;
tests["transaction.state is IN_PROGRESS"] = data.state === "IN_PROGRESS";

WordPress Multisite

Published 2013-11-03, 23:00

Today I spent some time reading up on WordPress Multisite. It was born out of WordPress MU and included in the Core of WordPress since version 3.0, but I never got around to really understand and use it. Here we go:

Information

Plugins

Special Cases

Future

Summary

Multisite seems to work fine but sometimes behaves a bit strange, especially if you want to do special things that it’s not (really) supposed to do. The documentation lacks a lot (note to myself: maybe help) and the not-in-the-focus development from MU to Multisite causes lots of problems with old blogs posts, strange wording and information, confusing everybody. So I’m going to try using it.

Laravel 4, Eloquent: Check if there is a Model with certain key-value pair in a Collection

Published 2013-10-17, 16:47

I wanted to find out if there already is a Model with a certain value for a certain column in a Collection that I retrieved realier in my code, e.g. is there already a User with name = Müller in my $users Collection?

$users->contains() can only check if there is a model with a certain primary key, and there also is no method to trivially search through all Models. Of course this all could be hacked together somehow*, but after a bit of searching I found this nice way to solve my question:

$value = 'Müller';
$key = 'name';
if(in_array($value, $users->lists($key))) { ... }

Collection->lists() gets an array with all the values of the Model for the requested key. Checking if our new value is in there, is super simple.

*Of course I first tried it this way:

  1. use $collection->filter() and then count the result
  2. hack $collection->contains() +$collection->find() to accept a field name as a parameter
  3. see 2, but copy the methods as private methods to my controller instead of tinkering with the framework code directly

All 3 solutions worked, but needed lots of ugly code.

PHP Frameworks

Published 2013-10-02, 11:16

As I’m getting back into working with PHP more hands-on I spent some time to look around to build this small overview of PHP frameworks. I seperated them into 3 groups: Most popular, Others and Obscure / Ancient / Dead.

Google Trends graphes

To be able to assess the popularity, these simple Google Trend charts may help:

The „old guys“


(WTH happened in October 2009?)

The „new guys“ (+ ZF for comparison)

Please note, that many people probably only search for „Zend“ to find Zend Framework.

Others

Obscure / Ancient / Dead

Sources

 

Wikipedia Mobile #1

Published 2012-04-08, 02:00

This morning I accidentally installed Wikipedia’s mobile app on my iPad. It felt sluggish, strange and not at all what I expected. As bitching doesn’t help and I wanted to use my professional knowledge in my free time, I started poking around. This is the result.

Starting position

The iOS Wikipedia app has really bad ratings. Users complain about bad performance, bad usability and about the feeling that this is more an Android app but an iOS app. In sum, this creates you a rating of only 2 stars for the current version. Ouch.

Android users seem to be happier with their 4.5 star rating. The problems only exists with the iOS version of the (similar) app. Strange. Let’s start with the basics and look into the feature set:

Doesn’t sound too bad. It’s not only stuff a mobile web site could do, so an app makes sense. So lets start to investigate.

What’s the background of all that?

The AppStore description of the app also links to a Twitter account and the source code of the app on Github:

From these two links I basically spent hours reading, clicking, reading again – typical procrastination stuff (Procrastinators beware if you are even near Wikipedia articles…). But I learned a lot ;) Back to topic: The following links all are relevant to the mobile efforts of Wikipedia:

While reading these pages, I noticed information about two different iOS apps: One is based on Rhodes, one on Phonegap. It turns out the Phonegap version for iOS is quite new and the old one is to be retired and phased out:

So we have several projects and initiatives in the mobile space of Wikipedia:

Not too bad. Of course the articles in the wiki are quite… organically grown and sometimes hard to differentiate and classify. But I think that’s the case most of the time when volunteers and professionals work together.

The funny stuff: code

Now I have an overview, so let’s get back to the funny stuff: code.

As I have never used git before, I spend some time installing all the tools and learning how to use them. After that I can finally checkout the repository on Github. While I do this, I notice that the README.md isn’t as pretty as all the readmes of the other Github projects I know. So that’s the first thing I decide to fix. 1 hours, lots of reading and 3 minutes of ‚coding‘ and a pull request later, it is done. My commit gets integrated by reedy a few minutes later. I’m in.

But now to the real code. The folder structure of the repository isn’t very clear. There are lot’s of confusing files in the root that don’t really belong there in a multi platform project, several folders that also don’t make sense to me or I can’t identify. Again, this seems to have grown over time. This is definitely something that could and should be fixed.

In /assets/www I find something that looks like the html application. Loooots of Javascript, jQuery and Zepto *confused. Anyway, using –disable-web-security I can open the Phonegap app in Chrome and even get it working! Still, several ‚file not found‘ as non-existant files are requested. But here it becomes quite clear, that the app itself is no bad in itself. It works, the code is more or less structured, you can see what the developer was thinking. Normally that’s a good thing. So as to not fish around without all information, I conclude my little poking session for today.

Conclusion

After getting this short glimpse into Wikipedia Mobile I think that the code isn’t the first problem to fix. First it needs some love in the Documentation and Organization of the code. So that’s where I will start. Let’s see what I can do.

PS: Well, I installed the app on my old iPod 3 (iOS 4.2.1) and tried to use it – completely unuseable. Maybe we should start with the code after all.

18 queries. 0,209 seconds.