Skip to content

Instantly share code, notes, and snippets.

@andrei512
andrei512 / doc.rb
Created April 25, 2015 08:16
the ruby code that won the ccc
require 'socket'
MAX_DIST = 120
@s = TCPSocket.new 'localhost', 7000
def get_number_of_rods
@s.puts "GET_NUMBER"
@s.gets.split.map(&:to_i)
end
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>A pure CSS parallax demo by Keith Clark</title>
<style>
/* Parallax base styles
prop_regex = /@property\s*\([^\)]+\)\s+(?<type>\w+(\s*\*)?)\s*(?<name>\w+)/
code = `pbpaste`
property_list = []
code.scan(prop_regex) do |match|
type, name = match
let a = "2"
#include <stdio.h>
#define NNodes 22
int Sum, Min, x, y, n, m, c, f[NNodes], st[NNodes], a[NNodes][NNodes];
void back(int k) {
if(k == n + 1) {
if(a[st[n]][st[1]] > 0) {
Sum += a[st[n]][st[1]];
import Foundation
protocol Alphabet {
associatedtype AlphabetCharacter: Comparable, Hashable
func allCharacters() -> [AlphabetCharacter]
init()