Skip to content

Instantly share code, notes, and snippets.

View photex's full-sized avatar
🎸
I may be slow to respond.

Chip Collier photex

🎸
I may be slow to respond.
View GitHub Profile
@photex
photex / Zenburn.xml
Created December 1, 2011 18:27
zenburn theme for qtcreator
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Zenburn">
<style name="AddedLine" foreground="#708c80" background="#313c36" bold="true"/>
<style name="Comment" foreground="#7f9f7f"/>
<style name="CurrentLine" foreground="#dcdccc" background="#262626"/>
<style name="CurrentLineNumber" foreground="#9fafaf" bold="true"/>
<style name="DiffFile" foreground="#ecbcbc" background="#41363c" bold="true"/>
<style name="DiffLocation" foreground="#80d4aa" background="#2f2f2f" bold="true"/>
<style name="DisabledCode" background="#555555" bold="true"/>
<style name="Doxygen.Comment" foreground="#80969f"/>
@photex
photex / strtest.c
Created January 19, 2011 15:54
see what happens
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char* argv[]) {
char *src="12345678";
char dst1[10];
char dst2[10];
// ensure that dst is clean
# This is a condensed snippet of making a python daemon manually.
# grizzled and python-daemon were simply not working as easily as
# I would expect, while this little bit of code works just fine.
# Assumes you've already used an OptionParser instance to get
# some info but that's easily modified.
if options.daemon:
# Fork once
pid = os.fork()
if pid > 0: