Skip to content

Instantly share code, notes, and snippets.

View tony's full-sized avatar
💭
I may be slow to respond.

Tony Narlock tony

💭
I may be slow to respond.
View GitHub Profile
@tony
tony / pillar settings.sls
Created February 12, 2014 16:19
php5 fcgi example (salt state + template config file)
username: tony
fullname: Tony N
mysql-version: 5.5
mysql-root-pw: root
{%- if grains['os'] == 'MacOS' %}
etc_dir: /opt/local/etc/
var_dir: /opt/local/var/
logs_dir: /opt/local/var/log/
@tony
tony / configure-ncmpcpp.sh
Created April 23, 2014 14:04
Configure vim, ncmpcpp
#!/bin/bash
./configure --with-curl --with-taglib --enable-unicode --enable-outputs --enable-visualizer --enable-clock
@tony
tony / Application.root.js
Last active August 29, 2015 14:01 — forked from isochronous/Application.root.js
Updated for Backbone 1.1, Marionette 1.8.x. Update to use wreqr, bindTo -> listenTo
define([
"underscore",
"backbone",
"marionette",
"vent"
],
/**
* Creates the primary `Marionette.Application` object that runs the admin framework. Provides a central point
* from which all other sub-applications are started, shown, hidden, and stopped.
@tony
tony / messages_test_mixin.py
Last active August 29, 2015 14:07 — forked from ojii/messages_test_mixin.py
messages_request() accepts args, kwargs
from contextlib import contextmanager
from django.contrib.messages.storage.base import BaseStorage, Message
from django.test.client import RequestFactory
from django.utils.decorators import method_decorator
class TestMessagesBackend(BaseStorage):
def __init__(self, request, *args, **kwargs):
self._loaded_data = []
super(TestMessagesBackend, self).__init__(request, *args, **kwargs)
@tony
tony / docutils_to_gh.rst
Last active August 29, 2015 14:14
docutils migrations to github
@tony
tony / xrandr.py
Created February 16, 2013 18:33
Displayport xrandr / xrandr.py / arandr issue. Base 0 not found. Fix is by Mihamina Rakotomandimby. More details in first comment below. This fixed displayport connections for me on Ubuntu 12.04 on a Thinkpad X230 with Minidock 3.
# ARandR -- Another XRandR GUI
# Copyright (C) 2008 -- 2011 chrysn <chrysn@fsfe.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@tony
tony / readthedocs-uwsgi.rst
Last active December 29, 2015 07:09
Using readthedocs uwsgi local

If the virtualenv is in checkouts/readthedocs.org/.env (before the readthedocs module), from inside of checkouts:

$ uwsgi_python \
--chdir $PWD \
--processes 4 --threads 2 \
--socket 127.0.0.1:3031 --http-socket 127.0.0.1:3032 \
--stats 127.0.0.1:9191 \
@tony
tony / chineseradicals.py
Created January 23, 2014 23:30
Scrape Chinese Radical information from HTML tables on the internet using requests and pandas.
#!/usr/bin/env python
# -*- coding: utf8 -*-
"""Pull Chinese Radical information from HTML tables on the internet.
:license: MIT License
:author: Tony Narlock
Requirements:
- lxml, html5lib, beautifulsoup4
@tony
tony / hi2.c
Created June 15, 2016 05:41
what's the story with AS_CFI_PSEUDO_OP tests
#include <stdio.h>
// run: clang -S hi2.c
int main(){
printf("HI");
}
@tony
tony / examples.md
Last active August 3, 2016 04:13
oxygine repo restructure

clone oxygine

❯ git clone https://github.com/oxygine/oxygine-framework oxygine

separate examples into oxygine-examples repo

add remote to new repo