Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rcfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nimrod
rcfiles
Compare revisions
01ee024ce207f243bab94f5659f3b95f5afc38c1 to 5aea62e8cf201587b771f72bdf9f22bca4b9b8c7
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
nimrod/rcfiles
Select target project
No results found
5aea62e8cf201587b771f72bdf9f22bca4b9b8c7
Select Git revision
Branches
master
1 result
Swap
Target
nimrod/rcfiles
Select target project
nimrod/rcfiles
1 result
01ee024ce207f243bab94f5659f3b95f5afc38c1
Select Git revision
Branches
master
1 result
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Better gcc flags.
· c3547642
nimrod
authored
2 years ago
Interface with make instead.
c3547642
ipinfo script.
· 5aea62e8
nimrod
authored
2 years ago
Get IP info from ipinfo.io.
5aea62e8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.bashrc
+3
-2
3 additions, 2 deletions
.bashrc
Documents/bin/ipinfo
+36
-0
36 additions, 0 deletions
Documents/bin/ipinfo
with
39 additions
and
2 deletions
.bashrc
View file @
5aea62e8
...
...
@@ -23,6 +23,7 @@ elif command -v w3m >/dev/null
then
export
BROWSER
=
w3m
fi
export
CFLAGS
=
"-g3 -Wall -Wextra -Wconversion -Wdouble-promotion -Wno-unused-parameter -Wno-unused-function -Wno-sign-conversion -fsanitize=undefined -fsanitize-trap"
export
CLOUDSDK_ACTIVE_CONFIG_NAME
=
'shore'
export
DOCKER_BUILDKIT
=
1
export
EDITOR
=
vim
...
...
@@ -49,6 +50,7 @@ export LESS_TERMCAP_ue=$'\E[0m'
export
LESS_TERMCAP_us
=
$'
\E
[01;32m'
export
LYNX_SAVE_SPACE
=
"
$HOME
/Downloads"
export
LYNX_TEMP_SPACE
=
"
$HOME
/.cache/lynx"
export
MAKEFLAGS
=
"-e -k -j4"
export
NODE_PENDING_DEPRECATION
=
'1'
export
NPM_CONFIG_USERCONFIG
=
"
$HOME
/.config/npmrc"
export
PATH
=
"
$GOPATH
/bin:
$PATH
"
...
...
@@ -104,7 +106,6 @@ alias df='df --output=source,fstype,size,used,avail,pcent,iavail,ipcent,target'
alias
diff
=
'diff --unified'
alias
dpkglog
=
"grep -v 'status
\\
|trigproc
\\
|configure' /var/log/dpkg.log"
alias
escape
=
'printf "%q"'
alias
gcc
=
'gcc --std=c99 -Wall -Wextra -Werror -pedantic'
alias
gen-mac
=
'hexdump -n5 -e '
\'
'"02" 5/1 ":%02X" "\n"'
\'
' /dev/urandom'
alias
gen-ssh-config
=
"rc_make .ssh/config"
alias
green
=
"printf '
\e
[1;92m%s
\e
[0m
\n
'"
...
...
@@ -230,7 +231,7 @@ gen_csr () {
jt
()
{
if
command
-v
pygmentize
>
/dev/null
then
python3
-m
json.tool
"
$@
"
| pygmentize
-l
j
avascript
python3
-m
json.tool
"
$@
"
| pygmentize
-l
j
son
else
python3
-m
json.tool
"
$@
"
fi
...
...
This diff is collapsed.
Click to expand it.
Documents/bin/ipinfo
0 → 100755
View file @
5aea62e8
#!/bin/sh
set
-eu
is_ip
()
{
echo
"
$1
"
|
grep
--extended-regexp
--quiet
'[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
}
usage
()
{
echo
"USAGE:
$(
basename
"
$0
"
)
[-h] [hostname or IP address]"
>
&2
echo
"If no address is passed, the internet IP address is used instead."
>
&2
}
if
[
"$#"
-eq
0
]
then
address
=
"
$(
curl
--silent
--fail
--show-error
https://myip.shore.co.il/
)
"
elif
[
"$#"
-gt
1
]
then
usage
exit
1
elif
[
"
$1
"
=
"-h"
]
then
usage
elif
is_ip
"
$1
"
then
address
=
"
$1
"
else
address
=
"
$(
dig +short
"
$1
"
)
"
fi
if
command
-v
pygmentize
>
/dev/null
then
curl
--silent
--fail
--show-error
--header
"Accept: application/json"
"https://ipinfo.io/
${
address
}
"
| pygmentize
-l
json
else
curl
--fail
--show-error
--header
"Accept: application/json"
"https://ipinfo.io/
${
address
}
"
fi
This diff is collapsed.
Click to expand it.