This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bluetooth | |
server_sock=bluetooth.BluetoothSocket( bluetooth.RFCOMM ) | |
port = bluetooth.get_available_port( bluetooth.RFCOMM ) | |
server_sock.bind(("",port)) | |
server_sock.listen(1) | |
print "listening on port %d" % port | |
uuid = "00001101-0000-1000-8000-00805F9B34FB" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g++ -o test test.cpp -llua |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/thread.hpp> | |
using namespace std; | |
using boost::thread; | |
using boost::mutex; | |
mutex a; | |
const int THREAD_COUNT = 10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/thread.hpp> | |
using namespace std; | |
using boost::thread; | |
using boost::mutex; | |
using boost::shared_lock; | |
using boost::shared_mutex; | |
using boost::upgrade_lock; | |
using boost::upgrade_to_unique_lock; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ------------------------ | |
; reverse.asm - Reverse a string without copying it | |
; Max length of string is 64 bytes | |
; This is for an x86_64 Linux System | |
; Assemble with: | |
; yasm -f elf64 reverse.asm | |
; Link with: | |
; ld -o reverse reverse.o | |
; Note: Also perfectly capable of swapping yasm for nasm without changing code | |
; ------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ircutils import bot | |
from random import randint | |
# Nice to me | |
GOOD_PEOPLE = ['exallium'] | |
GOOD_RESPONSES = ['Yes, sir.', "At once.", | |
"Right away, sir", "Of course.", "Absolutely."] | |
# Rude to people who aren't me. | |
BAD_RESPONSES = ["No.", "I'm not your toy.", "F*** off.", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file urlencode.c | |
* @brief URL Encoder and Decoder | |
* @author Geek Hideout | |
* @date 2011 | |
*/ | |
/* Copyright 2011 Geek Hideout. http://geekhideout.com | |
* Retrieved May 11th, 2012 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Required | |
DEBUG = True | |
# SQL Query Logging | |
# Rename _LOGGING to LOGGING to enable. | |
_LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': True, | |
'formatters': { | |
'simple': { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TemplateRenderer | |
constructor: (@directory='/static/templates', @cache={}) -> | |
render: (name, tmpl_data) -> | |
unless @cache[name] | |
url = @directory + '/' + name + '.html' | |
tmpl_string = null | |
$.ajax { | |
url: url, | |
method: 'GET', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Wrapper(object): | |
def __init__(self, **kwargs): | |
for key, value in kwargs.items(): | |
setattr(self, key, value) |