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.
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.
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.
WATCH OUT FOR FUCKING TYPOS.
It’s always the same! It’s either brackets, semicolons or fucking typos.
I hate programming.
(no I don’t)
Create a new project (the web service).
- Create a new ASP.NET Empty Web Application project inside your solution.
- Right click on the newly created project and select Add > Web Service (ASMX) (or Add > New Item and find it).
- Create the methods you need inside of it. Don’t forget to add
[WebMethod] above the method you want to use.
- When you are happy with it, right click the ASMX file and select View in Browser.
- 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.
- Right click on the old project and select Add > Service Reference.
- Paste the URL you copied to the Address field and click on Go, you should see the WS and the methods you exposed.
- Click on OK and you’re done.
Use the Web Service.
var ws = WebServiceSoapClient();
// WebService is the class name inside your WebService.asmx file.
Or, even better:
private WebServiceSoapClient _webServiceSoapClient;
if (_webServiceSoapClient == null)
_webServiceSoapClient = new 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.
Recently I have added a “Like” feature to the blog, which allows you to… well, like my posts!
The Like button is situated under the post, after the category and the tags.
To add it there, I slightly modified an already existing plugin, WTI Like Post. If you’d like to know more, continue reading.
Continue reading →
Today at work I had to check if the email of a client exists. Using the method below you can get this information directly from the mail server responsible. In this example I am querying my SMTP server at work (the domain is obviously fake, but the replies are legit).
See the step by step procedure
I published a bunch of tutorials on my old blog, which can still be found at blog.zurka.us.
- How To Build A Website
- HTML & CSS
Feel free to check them out.