Skip to content

Instantly share code, notes, and snippets.

module.exports.loop = function () {
console.log("Hello World")
var spawner = Object.values(Game.spawns)[0];
if (spawner.store[RESOURCE_ENERGY] >= 300) {
console.log(spawner.spawnCreep([WORK,CARRY,MOVE], Game.time));
}
Object.values(Game.creeps).forEach(c => {
# This file lists certificates that you wish to use or to ignore to be
# installed in /etc/ssl/certs.
# update-ca-certificates(8) will update /etc/ssl/certs by reading this file.
#
# This is autogenerated by dpkg-reconfigure ca-certificates.
# Certificates should be installed under /usr/share/ca-certificates
# and files with extension '.crt' is recognized as available certs.
#
# line begins with # is comment.
# line begins with ! is certificate filename to be deselected.
testing
set nocompatible " Use gVim defaults
" set tw=80 tw to specify a default text width
set fo=tcrq " fo to specify default formatoptions
" t auto-wraps text using textwidth
" c auto-wraps comments using textwidth
" r auto-inserts the current comment leader
" q allows formatting of comments
" allow backspacing over everything in insert mode
[Condor, Tackle]
Damage Control I
Overdrive Injector System I
Fleeting Warp Disruptor I
Patterned Stasis Web I
Limited 1MN Microwarpdrive I
Sensor Booster I, Targeting Range Script
Rocket Launcher I, Scourge Rocket
@curzonj
curzonj / gist:3099815
Created July 12, 2012 18:10
Allow chef to work inside a gem bundle
Mixlib::ShellOut.class_eval do
def exec(*args)
Bundler.with_clean_env do
# we have to rerun this because bundler wiped it
set_environment
gem_home = ENV.delete('GEM_HOME')
paths = ENV['PATH'].split(':')
ENV['PATH'] = paths.delete_if {|n| n =~ /^#{Regexp.escape(gem_home)}/ }.join(':')
@curzonj
curzonj / gist:1333585
Created November 2, 2011 13:13
customize the specs to run with a proc
RSpec::Core::RakeTask.class_eval do
def reject_patterns(&block)
@reject_patterns = block
end
private
def files_to_run
if ENV['SPEC']
@curzonj
curzonj / gist:1315957
Created October 26, 2011 10:17
Skeleton of a logstash router
#!/usr/bin/env jruby
require 'rubygems'
require 'logstash'
include Logstash
router = Router.new(ARGV) do
router.inputs(:queue => "queue1").add(
Inputs::Gelfd,
def debug_connection_frames(conn)
frames = conn.instance_variable_get('@frames')
if frames.size > 0
logger.debug("Frames: #{frames.size}")
list = frames.map do |frame|
str = "#{frame.class.name}(#{frame.channel},"
case frame
when AMQ::Protocol::HeaderFrame
str << "total #{frame.body_size})"
when AMQ::Protocol::MethodFrame