Skip to content

Instantly share code, notes, and snippets.

View drawcode's full-sized avatar
😎
Shipping product

Ryan Christensen drawcode

😎
Shipping product
View GitHub Profile
@drawcode
drawcode / stream.py
Created September 28, 2013 00:49
python stream
"A simple filter that prepends line numbers" # <-- Docstring
import sys
for fname in sys.argv[1:]: # ./program.py file1.txt file2.txt ...
with open(fname) as f:
# This reads in one line at a time from stdin
for lineno, line in enumerate(f, 1): # Start at 1
print '{:>6} {}'.format(lineno, line[:-1])
@drawcode
drawcode / regex_include_newlines.txt
Created September 22, 2013 01:47
Regex any character or new line.
((.|\n)*)
Open the FacebookPostProcess.cs file and find the following line:
[PostProcessBuild]
Change the line to be:
[PostProcessBuild( 999 )]
@drawcode
drawcode / wordpress_nested_page.php
Last active December 22, 2015 03:18
Nexted page content in homepage wordpress...
<div class="test_page">
<?php
$page_id = 41; //ID of page from your WP admin panel
$page_data = get_page( $page_id );
echo $page_data->post_title; // Show page title
echo $page_data->post_content; // Show page content
?>
</div>
#!/usr/bin/python
#based on the ideas from http://synack.me/blog/implementing-http-live-streaming
# Run this script and then launch the following pipeline:
# gst-launch videotestsrc pattern=ball ! video/x-raw-rgb, framerate=15/1, width=640, height=480 ! jpegenc ! multipartmux boundary=spionisto ! tcpclientsink port=9999
from Queue import Queue
from threading import Thread
from socket import socket
from select import select
from wsgiref.simple_server import WSGIServer, make_server, WSGIRequestHandler
@drawcode
drawcode / UnityVuforiaBarcodeScanning.cs
Created July 26, 2013 06:47
Unity Google QR Code scanning
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
using System.Linq;
using com.google.zxing.qrcode;
using com.google.zxing.multi;
using com.google.zxing.common;
using com.google.zxing;
using com.google.zxing.client.result;

Backend Architectures

ARCHITECTURES

ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats

/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;