You could edit the maximum allowed block size in the code. Change it to 100 KB and it'll be a soft fork, change it to 100 MB and it'll be a hard fork.
Good example.
Changing the max block size from 1MB to 0.1MB is a softfork, because it makes previously valid blocks (0.1MB-1MB) invalid.
Changing the max block size from 1MB to 10MB is a hardfork, because it makes previously invalid blocks (1MB-10MB) valid.