Skip to content

Instantly share code, notes, and snippets.

View joshbrand's full-sized avatar
❄️
🐆

Josh Brand joshbrand

❄️
🐆
View GitHub Profile
@joshbrand
joshbrand / get-public-ip.md
Created April 27, 2023 19:13 — forked from rkalkani/get-public-ip.md
Get public IP address used by your machine to connect to the internet

Get Public IP

DNS

Google

dig o-o.myaddr.l.google.com txt @ns1.google.com +short
# OR
nslookup -type=txt o-o.myaddr.l.google.com ns1.google.com

Keybase proof

I hereby claim:

  • I am joshbrand on github.
  • I am jbrand (https://keybase.io/jbrand) on keybase.
  • I have a public key ASCGCW_GRUYbQsDlA-jpG0hNdt0N6tzYacHJuh1eVeWh1go

To claim this, I am signing this object:

[Builder: opscode-reporting-cookbooks] I | $ /opt/opscode-reporting/embedded/bin/berks install --path=/opt/opscode-reporting/embedded/cookbooks
D | Using opscode-reporting (0.2.0) from metadata
D | Installing enterprise (0.3.0) from git: 'git@github.com:opscode-cookbooks/enterprise-chef-common.git' with branch: '0.3.2' at ref: 'd46c6274c7db18b59b8417a70172cd114358e409'
D | /opt/opscode-reporting/embedded/lib/ruby/1.9.1/net/http.rb:800:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
D | from /opt/opscode-reporting/embedded/lib/ruby/1.9.1/net/http.rb:800:in `block in connect'
D | from /opt/opscode-reporting/embedded/lib/ruby/1.9.1/timeout.rb:55:in `timeout'
D | from /opt/opscode-reporting/embedded/lib/ruby/1.9.
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-precise/linux-image-3.4.0-030400-generic_3.4.0-030400.201205210521_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-precise/linux-headers-3.4.0-030400_3.4.0-030400.201205210521_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-precise/linux-headers-3.4.0-030400-generic_3.4.0-030400.201205210521_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/m/module-init-tools/module-init-tools_3.16-1ubuntu2_amd64.deb
dpkg -i module-init-tools_3.16-1ubuntu2_amd64.deb linux-image-3.4.0-030400-generic_3.4.0-030400.201205210521_amd64.deb linux-headers-3.4.0-030400_3.4.0-030400.201205210521_all.deb linux-headers-3.4.0-030400-generic_3.4.0-030400.201205210521_amd64.deb
➜ cookbook-graphite git:(search_query) kitchen test --parallel
-----> Starting Kitchen (v1.0.0.beta.3)
-----> Cleaning up any prior instances of <default-ubuntu-1004>
-----> Cleaning up any prior instances of <default-ubuntu-1204>
-----> Cleaning up any prior instances of <default-centos-64>
-----> Cleaning up any prior instances of <ssl-ubuntu-1204>
-----> Cleaning up any prior instances of <default-centos-59>
-----> Destroying <default-ubuntu-1004>
-----> Cleaning up any prior instances of <ssl-ubuntu-1004>
-----> Cleaning up any prior instances of <ssl-centos-64>
2013-10-25 19:00:50,292 [salt.loaded.int.module.cmdmod][INFO ] Executing command 'dpkg -i --force-confold /var/cache/salt/minion/extrn_files/marconi-prod-ord/download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.4.deb' in directory '/root'
2013-10-25 19:00:50,326 [salt.state ][ERROR ] An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/salt/state.py", line 1258, in call
*cdata['args'], **cdata['kwargs'])
File "/usr/lib/pymodules/python2.7/salt/states/pkg.py", line 459, in installed
**kwargs)
File "/usr/lib/pymodules/python2.7/salt/modules/apt.py", line 420, in install
__salt__['cmd.run_all'](cmd, python_shell=False)
File "/usr/lib/pymodules/python2.7/salt/modules/cmdmod.py", line 685, in run_all
reset_system_locale=reset_system_locale)
@joshbrand
joshbrand / gist:7029313
Last active December 25, 2015 19:39
Git Primer

Setup

  • Fork rackerlabs/salt-queues to your account in github
  • Checkout your fork:
➜  tmp  git clone git@github.com:joshbrand/salt-queues.git
Cloning into 'salt-queues'...
remote: Counting objects: 763, done.
remote: Compressing objects: 100% (450/450), done.
#!/bin/bash
CHANGED=0
OUT=""
RETCODE=0
if [[ -e /usr/bin/pip || -e /usr/local/bin/pip ]]
then
if [ -e $(which uwsgi) ]
then
if [ "$(uwsgi --plugin-list 2>&1 | grep graylog2)" != "graylog2" ]
@joshbrand
joshbrand / gist:5372875
Created April 12, 2013 15:28
Jenkins IRCbot NullPointerException
1365780305463 <<<:jbrand!jbrand@rackspace-i0j.ndn.vmd5l0.IP PRIVMSG #atltest :!jenkins help
1365780305465 ### Your implementation of PircBotX is faulty and you have
1365780305465 ### allowed an uncaught Exception or Error to propagate in your
1365780305465 ### code. It may be possible for PircBotX to continue operating
1365780305465 ### normally. Here is the stack trace that was produced: -
1365780305465 ###
1365780305465 ### java.lang.NullPointerException
1365780305466 ### at org.jenkinsci.plugins.GithubSecurityRealm.loadGroupByGroupname(GithubSecurityRealm.java:459)
1365780305466 ### at org.jenkinsci.plugins.GithubSecurityRealm.loadUserByUsername(GithubSecurityRealm.java:428)
1365780305466 ### at hudson.plugins.im.IMConnectionProvider.impersonateUser(IMConnectionProvider.java:142)
➜ ~ traceroute www.rackspace.com
traceroute to www.wip.rackspace.com (207.97.209.147), 64 hops max, 52 byte packets
1 72.32.115.226 (72.32.115.226) 10.091 ms 9.878 ms 11.763 ms
2 67.192.56.50 (67.192.56.50) 10.327 ms 10.225 ms 10.113 ms
3 coreb.dfw1.rackspace.net (74.205.108.26) 11.497 ms
corea.dfw1.rackspace.net (74.205.108.10) 10.470 ms
coreb.dfw1.rackspace.net (74.205.108.26) 10.593 ms
4 bbr1.dfw1.rackspace.net (74.205.108.55) 11.442 ms
bbr1.dfw1.rackspace.net (74.205.108.57) 11.359 ms
bbr1.dfw1.rackspace.net (74.205.108.55) 11.013 ms