Skip to content

Instantly share code, notes, and snippets.

View xarses's full-sized avatar

Andrew Woodward xarses

  • San Francisco, Bay Area, CA
View GitHub Profile
@xarses
xarses / 3d7508e06572_master_from_14f3652.py
Created April 11, 2014 20:19
./manage.py migrate revision -m "master from 14f3652" --autogenerate
"""master from 14f3652
Revision ID: 3d7508e06572
Revises: 4f21f21e2672
Create Date: 2014-04-11 13:15:56.563349
"""
# revision identifiers, used by Alembic.
revision = '3d7508e06572'
#!/bin/bash
if [[ $(head /sys/kernel/mm/ksm/run) = "0" ]] ; then
echo "ksm is not enabled. /sys/kernel/mm/ksm/run must be 1"
return 1
fi
files=$(ls /sys/kernel/mm/ksm/pages*)
pagesz=$(getconf PAGESIZE)
for file in $files
@xarses
xarses / directions.md
Last active August 29, 2015 14:09
testing fuel-library changes
  1. copy pull-changes.sh from raw

    note: link could be wrong if updated below

    wget https://gist.githubusercontent.com/xarses/7cd6a335055546078a31/raw/pull-change.sh
  2. find review you want to test and go to patch set download section. Select pull, you should see line like

@xarses
xarses / auth-curl.sh
Last active August 29, 2015 14:10
using curl again with auth'd fuel
#!/bin/bash
if [ -z $OS_TOKEN ] ; then
export OS_TOKEN=$(python -c 'from fuelclient.client import Client
print Client().auth_token')
echo got my own OS_TOKEN=${OS_TOKEN}
fi
curl -H "X-Auth-Token: $OS_TOKEN" $@
@xarses
xarses / directions
Last active August 29, 2015 14:14
reset fuel database (WARNING WILL ERASE EVERYTHING)
dockerctl shell nailgun
manage.py drobdb
manage.py syncdb
manage.py loaddefault
exit
@xarses
xarses / keybase.md
Created February 9, 2015 20:27
keybase.md

Keybase proof

I hereby claim:

  • I am xarses on github.
  • I am xarses (https://keybase.io/xarses) on keybase.
  • I have a public key whose fingerprint is 683D DB7C CC60 E9F8 E271 3CBD 1853 F7E7 35DF BAED

To claim this, I am signing this object:

@xarses
xarses / Dockerfile
Created February 19, 2015 20:18
fuel-main docker file
# fuel-iso-builder
#
# iso building container for fuel
#
# Version 0.1
FROM ubuntu:14.04
MAINTAINER Andrew Woodward awoodward@mirantis.com
WORKDIR /root
@xarses
xarses / print-parts.sh
Created March 30, 2015 23:11
print-partations
for dev in $devs ;
do
echo "device: ${dev}"
parts=$(ls /dev/${dev}?*)
for part in $parts ;
do
partnum=$(echo ${part} | awk -F"/dev/${dev}" '{print $2}')
echo "Part: ${part}"
sgdisk -i ${partnum} /dev/${dev} | grep "Partition GUID code"
@xarses
xarses / gist:b780e45bc8b6385b6b83
Created April 28, 2015 15:18
Getting webex to work in Linux (Debian derived)

You cant use chrome/chromium as it can't launch java applets

Using firefox/iceweasel

Note: the packages here are what I was missing on Debian:Sid around Dec 2014. Your mileage may varry. If you install just icedtea, you can jump to attempting to run Webex and just chase the deps from there

echo missing packages for webex
sudo dpkg --add-architecture i386
sudo apt-get install icedtea-netx icedtea-plugin
@xarses
xarses / ksm-check.sh
Created May 28, 2015 17:25
ksm check script
#!/bin/bash
if [[ $(head /sys/kernel/mm/ksm/run) = "0" ]] ; then
echo "ksm is not enabled. /sys/kernel/mm/ksm/run must be 1"
exit 1
fi
files=$(ls /sys/kernel/mm/ksm/pages*)
pagesz=$(getconf PAGESIZE)
for file in $files