Skip to content

Instantly share code, notes, and snippets.

View rikukissa's full-sized avatar
🍔

Riku Rouvila rikukissa

🍔
View GitHub Profile
@rikukissa
rikukissa / POST.md
Last active May 6, 2024 11:52
React Hook prompting the user to "Add to homescreen" 🏠 #PWA #React
title slug createdAt language preview
React Hook prompting the user to "Add to homescreen"
react-hook-prompting-the-user-to-add
2018-11-29T20:35:02Z
en
Simple React Hook for showing the user a custom "Add to homescreen" prompt.

React Hook for showing custom "Add to homescreen" prompt

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rikukissa
rikukissa / repos.md
Last active September 10, 2023 14:12
Should I have my UI and my API in separate repositories?

Should I have my UI and my API in separate repositories?


Keep the number of repositories as small as possible.
You can easily start with just one repository and move some code to another when needed. This is to make your life within the project as easy as possible. As most increments require changes both in the API and the UI, it makes sense to treat them as one


@rikukissa
rikukissa / .gitignore
Last active July 21, 2023 13:47
Simple gulp + browserify + livereload example
node_modules
[core]
quotepath = false
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
[color]
ui = true
[color "branch"]
current = yellow black
local = yellow
@rikukissa
rikukissa / PrintDict.vba
Created August 16, 2018 13:08
Dictionary printer for Visual Basic
Function PrintDict(Dict as Dictionary, Optional ByVal Stack as String = "")
For Each Key In Dict.Keys()
If TypeOf Dict(Key) Is Dictionary Then
Debug.Print Stack & Key & ":"
PrintDict Dict(Key), Stack & " "
Else
Debug.Print Stack & Key & ": " & Dict(Key)
End If
Next
End Function
@rikukissa
rikukissa / POST.md
Last active January 27, 2020 08:10
Unit testing Angular.js app with node.js, mocha, angular-mocks and jsdom #angular.js #testing
title slug createdAt language preview
Unit testing Angular.js app with node.js, mocha, angular-mocks and jsdom
unit-testing-angular-js-app-with-node
2015-07-05T18:04:33Z
en
Majority of search result about unit testing Angular.js apps is about how to do it by using test frameworks that run the tests in a real browser. Even though it's great to be able to test your code in multiple platforms, in my opinion it creates a lot of boilerplate code and makes it hard to run the tests in, for instance a CI-server.

Testing Angular.js app headlessly with node.js + mocha

Lean unit tests with minimal setup

@rikukissa
rikukissa / README.md
Last active September 19, 2019 07:04
Collection of code simplification and refactoring tips #best practices #refactoring #code review

logo


Collection of code simplification and refactoring tips

Want to write clean code? Well here's your chance. The following set of examples are practices that I've come across during my times as a programmer and that I believe in. At least at the moment. Please feel free to add comments, criticise my thinking and contribute to everyone's knowledge. I'm trying to find a better platform for these, but for now a gist should do. I'm doing this solely to document, analyse and share my own thinking, which oftentimes is quite unstructured. These days I'm not too fussed about the syntactical structures of the code, but would rather concentrate on painting the largest guidelines and deciding the direction I want my programming style to move towards.

@rikukissa
rikukissa / POST.md
Last active August 28, 2019 04:49
No Code
title slug createdAt language preview comments
Kiinnostaako No Code? Tule kurssille!
no-code
2019-07-10T10:28:47Z
fi
Vievätkö jatkuvasti toistuvat digitaaliset askareet aikaasi oikealta työltä? Mitä jos pystyisit itse automatisoimaan osan työtehtävistäsi?
false

Kiinnostaako No Code? Tule kurssille!