Skip to content

Instantly share code, notes, and snippets.

View robertobermejo's full-sized avatar

Roberto Bermejo Martinez robertobermejo

View GitHub Profile
@robertobermejo
robertobermejo / moria.txt
Created October 4, 2019 12:38
Moria Ascii Art
. @$* @$3
'$Nueeed$$ed$$eeec$$
, 4$Lze@*$C2$b* ed(he*rb$CC$*$bc@$r
/@ |~~ .e$$"W$$B$B$** ^$ e""##d?$Bd$$$Nc. .. @\/~\
\==| 4$kd*Cr$6F#"` ** .*== # '"**F#$I$b$* | I
| d$5N@$$" ....eu$$$$$$N$*$zbeuu #$d$$$$b. / @/
@/ . z$Ted*"$P zue$*9d$$$@# W$e@B$$L. "#@$E$b@N
#d$Id*P# 'Nd$$B$**" .*, "#*N$$b$c $$$*$$c
.d#+C6J @@$B$*" -***- "#$$$$c *$$$#$u
..u$l4@"^"zJ$7W*" '*` ^*$@$$$r "$$E$@B>
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://ip-api.com/json');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$info = json_decode(curl_exec($ch));
$ipAddress = $_SERVER['REMOTE_ADDR'];
if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) {
$ipAddress = array_pop(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']));
@robertobermejo
robertobermejo / .gitconfig
Last active January 1, 2016 15:29
Git config
[user]
name = Roberto Bermejo Martinez
email = roberto@robertobermejo.es
[core]
excludesfile = /Users/rbermejo/.gitignore_global
editor = emacs
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]