Skip to content

Instantly share code, notes, and snippets.

View bossjones's full-sized avatar
💭
Learning every damn thing I can

Malcolm Jones (bossjones/Tony Dark) bossjones

💭
Learning every damn thing I can
View GitHub Profile
# source: https://github.com/mitchellh/packer/issues/1755
I've been trying with no success to use Packer to build an image with Rackspace. Currently here is my config:

{
  "variables": {
    "rackspace_username": "",
    "rackspace_password": ""
  },
  "builders": [
import threading
import time
class ThreadingExample(object):
""" Threading example class
The run() method will be started and it will run in the background
until the application exits.
"""
@bossjones
bossjones / missing_from_working_travis.sh
Created June 4, 2015 01:49
files missing from travis
± |feature-new-gst ✗| → diff -y --suppress-common-lines working_travis.txt travis_dpkg.txt | grep "<\|>"
> ii bogofilter-bdb 1.2.2+dfsg1-1
> ii bogofilter-common 1.2.2+dfsg1-1
ii clang 3.0-6ubuntu3 <
> ii dbus-x11 1.4.18-1ubunt
> ii dh-autoreconf 5ubuntu1
ii espeak-dbg 1.46.02-0ubun <
> ii faad 2.7-7
ii font-manager 0.5.7-3 <
> ii gir1.2-gda-5.0 5.0.3-1
@bossjones
bossjones / Makefile
Last active August 29, 2015 14:23 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
NOTE: idle_add is a GObject function that lets you run something in a seperate thread
NOTE: emit sends a signal to another object and does something based on that
NOTE: Anywhere that says 'IA:' means idle_add
NOTE: Anywhere that says 'E:' means emit 

Hi guys,

So I have a somewhat in depth question about the design of my application. Will do my best to just highlight the important information to ensure that there is enough to describe what I'm doing and what my possible pain points might be.

@bossjones
bossjones / scarlett_runner.py
Created October 14, 2015 23:33
Showing off how Scarlett will start from the command line.
if __name__ == "__main__":
# Set up and parse command-line args.
global scarlett_cli_args
parser = argparse.ArgumentParser()
parser.add_argument(
"--detect-session-bus", action="store_true", default=False)
parser.add_argument("--enable-feature", default="time")
scarlett_cli_args = parser.parse_args()
@bossjones
bossjones / client.py
Created October 20, 2015 21:19 — forked from caspian311/client.py
Simple client-service dbus example in python.
#!/usr/bin/env python
import dbus
class Client():
def __init__(self):
bus = dbus.SessionBus()
service = bus.get_object('com.example.service', "/com/example/service")
self._message = service.get_dbus_method('get_message', 'com.example.service.Message')
self._quit = service.get_dbus_method('quit', 'com.example.service.Quit')
@bossjones
bossjones / make.completion.bash
Created October 26, 2015 19:57
Auto complete for a SINGLE Makefile
#!/usr/bin/env bash
# Use cache files for make tasks or not.
# If set to "false" command "make list" will be executed every time.
export MAKE_COMPLETION_CACHE_TASKS=true
# File name where tasks cache will be stored (in current dir).
export MAKE_COMPLETION_CACHED_TASKS_FILENAME=".make_tasks~"
@bossjones
bossjones / sanatize_json.sh
Created November 3, 2015 06:47
sanatize_json.sh
○ → scarlett_task
scarlett_tasker.py:212: SyntaxWarning: name 'logger' is assigned to before global declaration
global logger
2015-11-03,01:38:42.924 (MainThread) DEBUG ScarlettTasker is connected to ScarlettListener
2015-11-03,01:38:42.924 (Thread-2 ) DEBUG ScarlettTasker running...
2015-11-03,01:38:43.925 (MainThread) INFO tralala
2015-11-03,01:38:44.927 (MainThread) INFO tralala
2015-11-03,01:38:45.928 (MainThread) INFO tralala
2015-11-03,01:38:46.929 (MainThread) INFO tralala
2015-11-03,01:38:47.009 (Thread-2 ) DEBUG player_cb PrettyPrinter:
@bossjones
bossjones / scarlett_ubuntu1404_base_history.txt
Created December 7, 2015 00:33
scarlett_ubuntu1404_base_history.txt
root@scarlettpi-system7:~# history
1 shutdown -h now
2 visudo
3 apt-get install vim
4 vim /etc/sudoers
5 exit
6 vim /etc/ssh/sshd_config
7 service sshd restart
8 service ssh restart
9 vim /etc/ssh/ssh_config