Skip to content

Instantly share code, notes, and snippets.

View jbwyatt4's full-sized avatar

John Wyatt jbwyatt4

View GitHub Profile
#!/usr/bin/env python3
# From BableTrace2 Documentation
import bt2
import sys
import datetime
# Create a trace collection message iterator from the first command-line
# argument.
msg_it = bt2.TraceCollectionMessageIterator(sys.argv[1])
With-in xapps manual build with ninja
[19/20] /root/parts/xapps/install/usr/bin/vapigen --quiet --library=xapp --directory=/root/parts/xapps/libxapp --metadatadir=/root/parts/xapps/build/libxapp --pkg=glib-2.0 --pkg=gio-unix-2.0 --pkg=gtk+-3.0 --metadatadir=/root/parts/xapps/build/libxapp /root/parts/xapps/libxapp/XApp-1.0.gir
FAILED: libxapp/xapp.vapi
/root/parts/xapps/install/usr/bin/vapigen --quiet --library=xapp --directory=/root/parts/xapps/libxapp --metadatadir=/root/parts/xapps/build/libxapp --pkg=glib-2.0 --pkg=gio-unix-2.0 --pkg=gtk+-3.0 --metadatadir=/root/parts/xapps/build/libxapp /root/parts/xapps/libxapp/XApp-1.0.gir
/root/parts/xapps/install/usr/bin/vapigen: error while loading shared libraries: libvala-0.40.so.0: cannot open shared object file: No such file or directory
[20/20] /root/parts/xapps/install/usr/bin/g-ir-compiler libxapp/XApp-1.0.gir --output libxapp/XApp-1.0.typelib
ninja: build stopped: subcommand failed.
Happens during xapps build.
[4/5] /root/parts/xapps/install/usr/bin/vapigen --quiet --library=xapp --directory=/root/parts/xapps/libxapp --metadatadir=/root/parts/xapps/build/libxapp --pkg=glib-2.0 --pkg=gio-unix-2.0 --pkg=gtk+-3.0 --metadatadir=/root/parts/xapps/build/libxapp /root/parts/xapps/libxapp/XApp-1.0.gir
FAILED: libxapp/xapp.vapi
/root/parts/xapps/install/usr/bin/vapigen --quiet --library=xapp --directory=/root/parts/xapps/libxapp --metadatadir=/root/parts/xapps/build/libxapp --pkg=glib-2.0 --pkg=gio-unix-2.0 --pkg=gtk+-3.0 --metadatadir=/root/parts/xapps/build/libxapp /root/parts/xapps/libxapp/XApp-1.0.gir
error: Package `glib-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories
error: Package `gobject-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories
[5/5] /root/parts/xapps/install/usr/bin/g-ir-compiler libxapp/XApp-1.0.gir --output libxapp/XApp-1.0.typelib
ninja: build stopped: subcommand failed.
name: xed-unofficial
version: 'git'
#grade: stable
#adopt-info: xed-unofficial
summary: 'xed is a small and lightweight text editor.'
description: |
xed is a small and lightweight text editor in the classic GTK style menus.
xed supports most standard editing features, plus several not found in your
average text editor (plugins being the most notable of these).
{
"name": "php_postgres",
"description": "",
"json_class": "Chef::Role",
"default_attributes": {
},
"override_attributes": {
},
"chef_type": "role",
"run_list": [
@jbwyatt4
jbwyatt4 / ruby_2_1.json
Created January 10, 2014 18:35
Ruby gist
{
"name": "ruby_2_1",
"description": "",
"json_class": "Chef::Role",
"default_attributes": {
"bluebook": {
"ruby_version": "2.1.0",
"package_version": "p0"
}
},
@jbwyatt4
jbwyatt4 / deploy.rb
Last active December 29, 2015 07:49
Mina deploy conf
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
# require 'mina/rbenv' # for rbenv support. (http://rbenv.org)
require 'mina/rvm' # for rvm support. (http://rvm.io)
set :domain, '148.211.114.67'
set :user, 'user'
set :webroot, '/var/www'
set :app_name, 'your_rails_app'
@jbwyatt4
jbwyatt4 / dbinstall-4.rb
Created November 19, 2013 10:28
Setup the deploy role and the new database.
# You should create a new role for each new database
# As an exercise for the reader try to DRY out creating the role and the db
execute "Setup deploy role" do
# I'm a block of code!
check = <<-EOH
psql -U postgres -c "select * from pg_roles where rolname='#{node.default[:bluebook][:db_role_deploy_username]}'" | grep -cw #{node.default[:bluebook][:db_role_deploy_username]}
EOH
# End block.
user "postgres"
command "psql -U postgres -c \"CREATE ROLE #{node.default[:bluebook][:db_role_deploy_username]} LOGIN ENCRYPTED PASSWORD \'#{node.default[:bluebook][:db_role_deploy_password]}\';\"" # postgres -c does not like '' and you need to use "" to filter.
@jbwyatt4
jbwyatt4 / dbinstall-3.rb
Created November 19, 2013 10:27
Change postgres's user and role's password.
# Change the automatically created postgres user's password
user "postgres" do
password node.default[:bluebook][:postgres_password]
action :modify
end
# Now change the postgres role password
execute "Change postgres role password" do
command "psql -U postgres -c \"ALTER USER postgres WITH ENCRYPTED PASSWORD '#{node.default[:bluebook][:db_role_postgres_password]}';\""
user "postgres"
@jbwyatt4
jbwyatt4 / application.yml
Created November 19, 2013 04:53
How to set the environment variables.
YOUR_APP_SECRET_TOKEN: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
YOUR_ROLE_NAME: deploy
YOUR_ROLE_PASSWORD: role_password
YOUR_RAILS_DB_NAME: your_rails_db