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/python | |
# Really simple example of usint cgkit's RenderMan | |
# Interface binding to generate a RIB file. | |
from cgkit.ri import * | |
from math import * | |
import sys |
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/python | |
# Really simple example of usint cgkit's RenderMan | |
# Interface binding to generate a RIB file. | |
from __future__ import print_function | |
from cgkit.ri import * | |
from math import * | |
import sys |
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
// Interesting C++ exception handling technique? | |
#include <iostream> | |
#include <cstdlib> | |
#include <ctime> | |
void damn() { | |
std::cout << "Damn\n"; | |
} |
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/python3 | |
# Script to merge two or more wiki tables and merge duplicate entries based on 'key' columns in each table | |
# How to use: | |
# wikimerge.py keys columns files... | |
# 'keys' is a comma seperated list of key columns for each table | |
# This is the column from each table that will be joined on | |
# Do not put spaces in the list. Use '1,2,3', not '1, 2, 3' |
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> | |
class WTF { | |
public: | |
WTF() : val(this) { } | |
WTF* operator->() { | |
std::cout << "hello "; | |
return this; | |
} | |
WTF &operator*() { |
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
(use gl) | |
(use gl.glut) | |
(use math.const) | |
(define cur-angle 0.0) | |
(define num-segments 16) | |
(define (init) | |
(let ((mat-ambient '#f32(1.0 1.0 1.0 1.0)) |
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 gosh | |
(use srfi-1) ;; List library | |
(use srfi-13) ;; String library | |
(use srfi-19) ;; Date/time | |
(use sxml.ssax) | |
(define (make-tpt) | |
(list 0 0 0 0)) |
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 gosh | |
;; Update Windows Chromium to the latest build | |
(use rfc.http) | |
(define (web-get host url) | |
(receive (respCode headers body) (http-get host url) body)) | |
(define (main args) |
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/ruby | |
# Quick and dirty C++ inheritance tree using GraphViz's dot command | |
# Limitations: | |
# * Only handles single inheritance | |
# * Base classes must be specified on a single line: | |
# Such as "class Foo : public Bar" | |
require "find" | |
ofile = ARGV.shift |
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 python3 | |
import os | |
import subprocess | |
import http.client | |
# Install the latest Chromium snapshot build on Windows | |
conn = http.client.HTTPConnection('build.chromium.org') | |
conn.request("GET", '/f/chromium/snapshots/chromium-rel-xp/LATEST') | |
r1 = conn.getresponse() |