jenkins-stats.py is used to generate statics for jenkins server, so far it display the plugin's usage in each job, see related stackoverflow question:how can I know whether the plugin is used by any jobs in jenkins
python-requests module is required
| \n | |
| time_namelookup: %{time_namelookup}\n | |
| time_connect: %{time_connect}\n | |
| time_appconnect: %{time_appconnect}\n | |
| time_pretransfer: %{time_pretransfer}\n | |
| time_redirect: %{time_redirect}\n | |
| time_starttransfer: %{time_starttransfer}\n | |
| ----------\n | |
| time_total: %{time_total}\n | |
| \n |
| class Dog | |
| attr_writer :name | |
| def initialize(name) | |
| @name = name | |
| end | |
| def bark | |
| puts "patrick" | |
| end |
| -- Found at: | |
| -- http://www.if-not-true-then-false.com/2009/postgresql-psql-psqlrc-tips-and-tricks/ | |
| -- http://opensourcedbms.com/dbms/psqlrc-psql-startup-file-for-postgres/ | |
| \set QUIET ON | |
| \pset pager always | |
| \pset null 'NULL' |
jenkins-stats.py is used to generate statics for jenkins server, so far it display the plugin's usage in each job, see related stackoverflow question:how can I know whether the plugin is used by any jobs in jenkins
python-requests module is required
PLEASE SCROLL DOWN AND READ THE COMMENTS FOR A MORE UP TO DATE WAY (AND EASIER) TO DO THIS
When using Homebrew (http://brew.sh) and searching formulas or pull requests you may get the dreaded error message: Github API Rate limit exceeded
Let's fix that! (yeah!)
PLEASE SCROLL DOWN AND READ THE COMMENTS FOR A MORE UP TO DATE WAY (AND EASIER) TO DO THIS
TLDR: I now add the following snippet to all my Dockerfiles:
# If host is running squid-deb-proxy on port 8000, populate /etc/apt/apt.conf.d/30proxy
# By default, squid-deb-proxy 403s unknown sources, so apt shouldn't proxy ppa.launchpad.net
RUN route -n | awk '/^0.0.0.0/ {print $2}' > /tmp/host_ip.txt
RUN echo "HEAD /" | nc `cat /tmp/host_ip.txt` 8000 | grep squid-deb-proxy \
&& (echo "Acquire::http::Proxy \"http://$(cat /tmp/host_ip.txt):8000\";" > /etc/apt/apt.conf.d/30proxy) \
&& (echo "Acquire::http::Proxy::ppa.launchpad.net DIRECT;" >> /etc/apt/apt.conf.d/30proxy) \
|| echo "No squid-deb-proxy detected on docker host"
Constant lookup in Ruby can happen lexically or through the ancestry tree of the receiver(a class or module). You can identify which lookup rules are being applied by the context you're in or by the syntax being used to define a class or module.
A class body that is defined as class A::B::C; …; end will lookup
constants through the ancestry tree when a constant is evaluated in
its class body. Anytime you see A::B::C being used as syntax to
define a class or lookup the value of a constant the ancestry tree
is being used for the lookup.
| import static groovy.json.JsonOutput.* | |
| def config = ['test': 'lalala'] | |
| println prettyPrint(toJson(config)) |
| # This is a skeleton for testing models including examples of validations, callbacks, | |
| # scopes, instance & class methods, associations, and more. | |
| # Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
| # | |
| # I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
| # so if you have any, please share! | |
| # | |
| # This skeleton also assumes you're using the following gems: | |
| # | |
| # rspec-rails: https://github.com/rspec/rspec-rails |
| # Change Java Runtime: | |
| sudo update-alternatives --config java | |
| # Delete Open-JDK | |
| sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\* | |
| # Change fonts - remove hinting: | |
| http://askubuntu.com/questions/32624/ugly-fonts-in-netbeans-how-can-i-make-it-use-the-system-font | |
| # Change RubyMine AntiAliasing first: |