Note: I wrote this some time ago and forgot to publish. The original thing is a gist on github, in case something looks weird here.

Not sure if I’m that stupid or people are starting to make life harder for everyone. I lost a day to figure stuff out, all while growing a couple more gray hair. I also cursed a lot and considered quitting programming (again).

Maybe it’s just me, maybe I overthink everything. I suppose I though GraphQL was something else. I suppose I expected it to help me write an API faster, but it’s not like that. It’s easier to query the API, but you still have to code everything on your own to make this possible (like the queries).

There are things like join monster (example below) that generate SQL SELECT queries for you (based on the GraphQL query you throw at it), but apart from that, you are on your own.

Read more…

Didn’t find any actual guide online so I’m going to write a not-so-simple one.

Use this if you own a .eth domain, and you want to create and link a subdomain to an ethereum address (eg. to your exchange wallet).

Same goes if you own a subdomain, you just skip the first step.

Below the (very verbose) javascript code with a step-by-step procedure.

Click here to see the code so I don’t overload the first page.

A lot has been written on the web about this, but I’m still going to write this down so I don’t forget.

I managed to get from a ~400kb bundle (the file was not served as gzipped) to a ~50kb bundle (gzipped), which is pretty amazing, in three steps (and some researching).

I mixed up the steps when writing this post, that’s why the file sizes I am reporting are not consistent. I actually went with Step 2, Step 3, and finally, Step 1.

Click to see the steps.

Create a new project (the web service).

  1. Create a new ASP.NET Empty Web Application project inside your solution.
  2. Right click on the newly created project and select Add > Web Service (ASMX) (or Add > New Item and find it).
  3. Create the methods you need inside of it. Don’t forget to add [WebMethod] above the method you want to use.
  4. When you are happy with it, right click the ASMX file and select View in Browser.
  5. In the browser, select and copy the location to the WS (in my case http://localhost:65057/WebService.asmx).

Add a reference to the old project.

  1. Right click on the old project and select Add > Service Reference.
  2. Paste the URL you copied to the Address field and click on Go, you should see the WS and the methods you exposed.
  3. Click on OK and you’re done.

Use the Web Service.

var ws = WebServiceSoapClient();
// WebService is the class name inside your WebService.asmx file.
ws.MethodName();

Or, even better:

private WebServiceSoapClient _webServiceSoapClient;
WebServiceSoapClient WebService
{
    get
    {
        if (_webServiceSoapClient == null)
        {
            _webServiceSoapClient = new WebServiceSoapClient();
        }
        return _webServiceSoapClient;
    }
}

var something = WebService.MethodName();

If you update your Web Service remember to right click on the Service Reference and select Update Service Reference (you might need to have the server running before by viewing the asmx file in your browser).

Sixteen steps that will definitely save you a lot of time if you’re working with workflows, especially the more complex ones.

Saved me a lot of trouble at work, I had to clone a list along with all of it’s workflows to another site.

Saving the list as template helped me move everything (including all of the custom made forms!), while the workaround below made it possible to simply import the workflows I had in place into the new list!

Click here to see the step by step tutorial.