Skip to content

Instantly share code, notes, and snippets.

View FilBot3's full-sized avatar
๐Ÿ˜€
Working hard

FilBot3 FilBot3

๐Ÿ˜€
Working hard
View GitHub Profile
@FilBot3
FilBot3 / custom_PS1_1.sh
Last active February 26, 2017 22:03
custom bash prompt
# http://ezprompt.net/
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}]"
else
echo ""
@FilBot3
FilBot3 / 00-webspehreEarInstall.py
Last active February 23, 2020 19:32
WebSphere EAR install using Jython fail
wsadmin>AdminApp.install('/home/wasadmin/HelloWorld3.ear', ['-cluster', 'AppTarget', '-filepermission', '.*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755', '-MapModulesToServers', [['.*', '.*', 'WebSphere:cell=DEVCELL,cluster=AppTarget,node=WPSDEV00,server=WebApp00']], '-MapWebModToVH', [['.*', '.*', 'default_host']]])
ADMA5016I: Installation of HelloWorld3 started.
ADMA5058I: Application and module versions are validated with versions of deployment targets.
ADMA5005I: The application HelloWorld3 is configured in the WebSphere Application Server repository.
ADMA5005I: The application HelloWorld3 is configured in the WebSphere Application Server repository.
ADMA5081I: The bootstrap address for client module is configured in the WebSphere Application Server repository.
ADMA5053I: The library references for the installed optional package are created.
ADMA5005I: The application HelloWorld3 is configured in the WebSphere Application Server repository.
ADMA5001I: The application binaries are saved in /opt/IBM/WebSphere/
@FilBot3
FilBot3 / json_example_get.go
Last active August 29, 2015 14:26
GO JSON Example GET
/**
*
* http://stackoverflow.com/q/20293977/2009612
*/
package main
import (
"fmt"
"net/http"
@FilBot3
FilBot3 / 00-knife_opc_user_remove.sh
Created August 17, 2015 16:36
Chef 12 Server Core User Deletion
PS> knife opc org user remove csm user01
ERROR: You authenticated successfully to https://chefserver01:443 as user01 but you are not authorized for this action
Response: Please remove user01 from this organization's admins group before removing him or her from the organization.
@FilBot3
FilBot3 / 00-config.yml
Last active August 29, 2015 14:27
Razor Server setup issue
---
# This is the configuration file for the Razor server. For each
# environment, the file contains a hash of configuration values. The
# special environment 'all' is used to set configuration values for all
# environments
#
# The *database_url* setting must be a connection URL for
# (Sequel)[http://sequel.rubyforge.org/rdoc/files/doc/opening_databases_rdoc.html]
production:
@FilBot3
FilBot3 / zabbix_get_IO_stat.sh
Created August 20, 2015 21:08
Gets a stat from the Linux OS for LV read/write, i forget which field it was.
sudo -u zabbix -- cat /proc/diskstats | /bin/grep dm-`dmsetup ls | grep \`cat /etc/fstab | grep /u01/app/oracle/admin/mybi_domain/mserver/applications | awk '{print $1}' | awk -F/ '{print $NF}'\` | awk '{print $3}' | sed s'/.$//'` | awk '{print $13}'
@FilBot3
FilBot3 / CentOS_6_ChefDK_070_notworking.rb
Last active September 15, 2015 23:00
chef_knife_cookbook_upload_notworking
[vagrant@centos6 vagrant]$ chef exec knife cookbook upload confluence_install
ERROR: Could not find cookbook confluence_install in your cookbook path, skipping it
ERROR: Failed to upload 1 cookbook.
[vagrant@centos6 vagrant]$ chef exec knife cookbook upload confluence_install -o ./cookbooks/
ERROR: Could not find cookbook confluence_install in your cookbook path, skipping it
ERROR: Failed to upload 1 cookbook.
[vagrant@centos6 vagrant]$ chef exec knife cookbook upload confluence_install -o /vagrant/cookbooks/
ERROR: Could not find cookbook confluence_install in your cookbook path, skipping it
ERROR: Failed to upload 1 cookbook.
[vagrant@centos6 vagrant]$ chef exec knife cookbook upload confluence_install -o /vagrant/cookbooks/ --verbose
@FilBot3
FilBot3 / zabbix_proxy_fixit.sql
Last active July 4, 2018 02:43
Zabbix SQL queries to help "fix" issues
USE zabbix_proxy;
TRUNCATE TABLE proxy_history;
DELETE FROM ids;
@FilBot3
FilBot3 / 00-knife.rb
Last active February 25, 2016 15:32
Berkshelf not reading knife.rb from Chef-Repo
certs_loc = File.expand_path('.', File.dirname(__FILE__))
puts "Certificates are loacted here: #{certs_loc}"
log_level :info
log_location STDOUT
node_name 'pd028300'
client_key "#{certs_loc}/PD028300.pem"
validation_client_name 'chef-validator'
validation_key "#{certs_loc}/chef-validator.pem"
chef_server_url 'https://chefserver.local.net:443'
syntax_check_cache_path 'C:/Users/PD028300/.chef/syntax_check_cache'
@FilBot3
FilBot3 / docker-zabbix-db.service
Last active December 1, 2015 17:15
Using SystemD to start Docker Containers but are failing
[Unit]
Description=Zabbix MariaDB for 2.4
Requires=docker.service
After=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStart=/usr/bin/docker run -d --name zabbix-db -v /backups:/backups --volumes-from zabbix-db-storage --env="MARIADB_USER=zabbix" --env="MARIADB_PASS=my_password" zabbix/zabbix-db-mariadbserver-2.4
ExecStop=/usr/bin/docker stop -t 2 zabbix-db