Here's one that is not continuous but is well defined. For irrational $x$, let $f(x)=0$. For rational $x=\frac{a}{b}$ where $\gcd(a,b)=1$, let $f(x)=b$.
The proof is simple: for irrational $x$, let $x_n$ be a sequence of rationals that approach $x$. Now, any sequence of rationals that approach an irrational must have unbounded denominators (and numerators but that isn't important here). Suppose this was not the case, and there exists irrational $\lambda$ and sequence of rationals $\lambda_n=\frac{a_n}{b_n}$ such that the denominators are bounded by $M\in\mathbb{N}$. Then
$$ \lim_{n\to\infty}M! \frac{a_n}{b_n}=M!\lambda$$
But $M! \frac{a_n}{b_n}$ is an integer as $b_n\leq M$ implies $b_n|M!$. Since a sequence of integers cannot approach an irrational number, we conclude $b_n$ is unbounded.
For rational $x=\frac{a}{b}$ where $\gcd(a,b)=1$, the proof is even easier.
Define
$$x_n=x+\frac{1}{p_n}=\frac{a}{b}+\frac{1}{p_n}=\frac{ap_n+b}{bp_n}$$
where $p_n$ is the $n$th prime. Clearly, $x_n$ goes to $x$ since $p_n$ goes to infinity. Just as clearly, $\gcd(p,b_n)=1$ for all but a finite number of $n$. Thus, as $n$ goes to infinity,
$$\gcd(ap_n+b,b)=\gcd(ap_n,b)=1$$
Additionally, as $n$ goes to infinity
$$\gcd(ap_n+b,p_n)=\gcd(b,p_n)=1$$
Thus
$$\gcd(ap_n+b,bp_n)=1$$
Thus,
$$f(x_n)=f\left(\frac{ap_n+b}{bp_n}\right)=bp_n$$
which is unbounded and we are done.