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 | |
| # This script sorts static libraries in the topological order suitable for | |
| # passing to ld. No need for --start-group/--end-group anymore. Should speed | |
| # up the linking a bit. When the libraries contain actual circular dependecies | |
| # the script will detect minimal groups of those and surround them with | |
| # --start-group/--end-group. | |
| # | |
| # To run you need Linux (maybe OS X), Ruby 1.9+ and the rgl gem installed: | |
| # |
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
| # Utilities for quickly accessing frequently used directories in bash. | |
| # Usage: | |
| # $ cd /path/to/project/src/ | |
| # $ mark code # Will create a new shortcut. | |
| # # Becomes interactive if a shortcut already exists | |
| # # m is an alias for mark. You can also `m code` | |
| # | |
| # $ code # From now on, running this anywhere in the shell | |
| # # will put you in /path/to/project/src/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
| #!/bin/bash | |
| # | |
| # this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe | |
| # mounted at /mnt. It should be run early on the first boot of the system. | |
| # | |
| # Beware, This script is NOT fully idempotent. | |
| # | |
| METADATA_URL_BASE="http://169.254.169.254/2012-01-12" |
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 scala.annotation.StaticAnnotation | |
| import scala.reflect.macros.Macro | |
| import language.experimental.macros | |
| class body(tree: Any) extends StaticAnnotation | |
| trait Macros extends Macro { | |
| import c.universe._ | |
| def selFieldImpl = { |
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 java.io._ | |
| @SerialVersionUID(15L) | |
| class Animal(name: String, age: Int) extends Serializable { | |
| override def toString = s"Animal($name, $age)" | |
| } | |
| case class Person(name: String) | |
| // or fork := true in sbt |
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
| /* | |
| Copyright 2018 Viktor Klang | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |
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
| function toArray(args) { | |
| return [].slice.call(args); | |
| } | |
| function autocurry(fn) { | |
| var len = fn.length; | |
| var args = []; | |
| return function next() { | |
| args = args.concat(toArray(arguments)); | |
| return (args.length >= len) ? |
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 "SSLBuffer.h" | |
| SSLBuffer::SSLBuffer() | |
| :ssl(NULL) | |
| ,read_bio(NULL) | |
| ,write_bio(NULL) | |
| ,write_to_socket_callback(NULL) | |
| ,write_to_socket_callback_data(NULL) | |
| ,read_decrypted_callback(NULL) | |
| ,read_decrypted_callback_data(NULL) |
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 python | |
| """Disco worker that automatically finds and sends to the nodes all the modules and packages that are used""" | |
| import os | |
| import sys | |
| import shutil | |
| import tempfile | |
| import zipfile | |
| import modulefinder | |
| from inspect import getsourcefile, getmodule |
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
| ''' | |
| chunked_server_test.py | |
| Copyright August 3, 2012 | |
| Released into the public domain | |
| This implements a chunked server using Python threads and the built-in | |
| BaseHTTPServer module. Enable gzip compression at your own peril - web | |
| browsers seem to have issues, though wget, curl, Python's urllib2, my own | |
| async_http library, and other command-line tools have no problems. |