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
| /* | |
| * This file is part of the "plgl" project | |
| * (c) 2014 Paul Asmuth <paul@paulasmuth.com> | |
| * | |
| * All rights reserved. Please contact me to obtain a license. | |
| */ | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <math.h> | |
| #include <plgl/engine.h> |
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
| #!/usr/bin/env ruby | |
| require "socket" | |
| udp = UDPSocket.new | |
| udp.bind('0.0.0.0', 8125) | |
| targets = [ | |
| ["localhost", 8125], | |
| ["other.host.net", 8125] | |
| ] |
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
| cmake_minimum_required(VERSION 2.6) | |
| project(blahblah) | |
| set(PROJ_SOURCES | |
| src/a.cc | |
| src/b.cc) | |
| if(APPLE) | |
| set(CMAKE_CXX_FLAGS "-std=c++0x -stdlib=libc++ ${CMAKE_CXX_FLAGS}") | |
| else() |
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
| require 'json' | |
| MY_JSON_FILE = File.open('big_json.json').read | |
| MY_MARSHAL_FILE = File.open('big_json.dat').read | |
| class FileLoader | |
| def load_via_json | |
| JSON.parse(MY_JSON_FILE) | |
| end |
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
| puts "if you're happy and you know it, NoMethodError" | |
| (nil.fnord rescue nil) |
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
| require 'rubygems' | |
| require 'rspec' | |
| require 'mongoid' | |
| describe "is this a bug?" do | |
| Mongoid.configure do |config| | |
| config.master = Mongo::Connection.new('localhost','27017').db('mongotest') | |
| end |
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
| # i hope this helps... | |
| # to set the username and picture send these events to fm | |
| # -> you don't need to define any event handlers | |
| # -> the session token (_session) could be your unique session id | |
| # or the unique user id (it's hashed) | |
| # set the user name | |
| { "_type": "_set_name", "name": "Tingle Tangle Bob", "_session": "mysessiontoken" } |
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
| # the "abstract" node | |
| class BPGraph::Node | |
| # initialize an instance with id of the correct subclass from a node_key | |
| def self.load(node_key) | |
| end | |
| def initialize(node_id) | |
| @node_class ||= :node |
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
| namespace :tlnt do | |
| desc "deploy to staging environment" | |
| task :deploy_staging => :environment do | |
| deploy_to_environment(:staging) | |
| end | |
| desc "restart staging environment" | |
| task :restart_staging => :environment do | |
| restart_environment(:staging) |
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 <stdio.h> | |
| #include <time.h> | |
| void clearscreen(){ | |
| fputs("\033[H\033[2J", stdout); | |
| } | |
| int main(int argc, char* argv[]){ | |
| char *frame01 = |
OlderNewer