Skip to content

Instantly share code, notes, and snippets.

  • Dog
    • Puppy 1
    • Puppy 2
      • Page 1
        • Page 2
    • Puppy 3
      • Page 1
      • Page 2
      • Page 3
  • Page 4
@jamiely
jamiely / blog_tattack_cljs_opt.md
Last active December 16, 2015 10:08
Blog entry discussing implementing advanced optimization for the Tetris Attack Clojure Project

Intro

The latest update to Tetris Attack ClojureScript was getting advanced compilation to work. lein-cljsbuild allows you to specify settings for compiling your ClojureScript code to JavaScript. This article by Luke Vanderhart has a lot of detail about the various options you can specify.

  • Talk about the process of enabling advanced optimization
  • Work with v1.0.4 code and address problems step by step
  • Problems
    • Browser repl bug
  • Problem with cljsbuild auto not rebuilding updated config settings for game.prod.js
@jamiely
jamiely / blog.md
Created April 18, 2013 02:13
blog tetris attack clojurescript performance

Intro

The game runs decently on my MacBook Air running Chrome 26. In FireFox 18, the game kind of crawls. Let's try to figure out the problem. I'll be looking at project tag v1.0.3.

Open Chrome DevTools. Navigate to the "Profiles" tab. Refresh the app and select "Collect

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://api.jqueryui.com/" />
<title>selenium</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Spinner - Default functionality</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="/resources/demos/external/jquery.mousewheel.js"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />

Intro

I wanted to work on another Android app, one that will need to read an RSS feed. Upon looking up libraries, I came across android-rss.

Android RSS

Didn't support loading as an Eclipse project (easily), so I decided to look into using Maven to manage Android project dependencies.

Maven Android Plugin

@jamiely
jamiely / add_comment.rb
Created December 18, 2012 02:45
Add a comment to Jira via Soap
add_comment = client.request(:add_comment) do
soap.body do |xml|
xml.in0 token
xml.in1 ticket_num
# create a remote comment
xml.in2('xsi:type' => 'ins0:RemoteComment') {
xml.body "This is a comment from Ruby",
'xsi:type' => 'xsd:string'
xml.author 'xsi:type' => 'xsd:string', 'xsi:nil' => 'true'
xml.created 'xsi:type' => 'xsd:dateTime', 'xsi:nil' => 'true'
@jamiely
jamiely / default.rb
Created November 2, 2012 19:54
default.rb
# Connects apache and php.
package "libapache2-mod-php5" do
action :install
end
# Required for symfony
%w{php5-sqlite php5-mysql}.each do |php_module|
package php_module do
action :install
end
UIImageView __block *localFeatherImageView = [ [ UIImageView alloc ] initWithFrame:CGRectMake( 0.0f, 0.0f, featherAssetSize.width, featherAssetSize.height ) ];
self->featherImageView = localFeatherImageView;
self->featherImageView.animationImages = [ featherAssetDictionary objectForKey:[ NSNumber numberWithInt:APContentDictionaryKeyAnimationImages ] ];
self->featherImageView.animationDuration = animationDuration;
self->featherImageView.center = self.center;
[ self->featherImageView startAnimating ];
[ self.superview addSubview:self->featherImageView ];
void ( ^removedFeatherImageViewBlock )( void ) = ^
@jamiely
jamiely / Pdf2htmlex.rb
Created September 20, 2012 20:27
Pdf2htmlex.rb
require 'formula'
class Pdf2htmlex < Formula
homepage 'http://coolwanglu.github.com/pdf2htmlEX/'
url 'https://github.com/coolwanglu/pdf2htmlEX.git', :tag => 'v0.3.1'
head 'https://github.com/coolwanglu/pdf2htmlEX.git'
version 'v0.3.1'
sha1 '325901f101b66e8b4959e3619dfe42a0068c0b09'
depends_on 'cmake' => :build