A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
/// <reference path="angular.d.ts" /> | |
/// <reference path="angular-resource.d.ts" /> | |
interface IEmployee extends ng.resource.IResource<IEmployee> | |
{ | |
id: number; | |
firstName : string; | |
lastName : string; | |
} | |
interface IEmployeeResource extends ng.resource.IResourceClass<IEmployee> |
/* | |
* Angular LoadScript | |
* | |
* Let angular load and execute lazy javascript from partials! | |
* | |
* This module is the result of this issue: "1.2.0rc1 regression: script tags not loaded via ngInclude" | |
* Issue url: https://github.com/angular/angular.js/issues/3756 | |
* | |
* As of Angular 1.2.0 the ngInclude scripts does not permit execution of javascript from included partials. | |
* This little module execute code inside script tags with "javascript-lazy" attribute after partial loading, |
#!/usr/bin/env ruby | |
progress = 'Progress [' | |
1000.times do |i| | |
# i is number from 0-999 | |
j = i + 1 | |
# add 1 percent every 10 times | |
if j % 10 == 0 |
package com.javametmoi.test.dbsetup; | |
import static com.ninja_squad.dbsetup.Operations.insertInto; | |
import static com.ninja_squad.dbsetup.Operations.sequenceOf; | |
import static org.junit.Assert.assertEquals; | |
import java.sql.SQLException; | |
import javax.sql.DataSource; |
package com.javametmoi.test.dbsetup; | |
import java.lang.reflect.InvocationHandler; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Proxy; | |
import java.sql.Connection; | |
import java.sql.SQLException; | |
import javax.sql.DataSource; |
module SpecHelper | |
def local_io(in_str) | |
old_stdin, old_stdout = $stdin, $stdout | |
$stdin = StringIO.new(in_str) | |
$stdout = StringIO.new | |
yield | |
$stdout.string | |
ensure | |
$stdin, $stdout = old_stdin, old_stdout | |
end |
Scenario:
tell application "iTerm" | |
activate | |
tell (make new terminal) | |
tell (launch session "initial_session") to write text "cd ~/workspace/project1; clear" | |
tell i term application "System Events" to keystroke "D" using command down | |
tell last item of sessions to write text "cd ~/workspace/work/project2; clear" | |
tell i term application "System Events" to keystroke "d" using command down | |
tell last item of sessions to write text "cd ~/workspace/work/project3; clear" |
require 'java' | |
java_import java.util.concurrent.Executors | |
@count = java.util.concurrent.atomic.AtomicInteger.new | |
def send_email(executor) | |
executor.submit do | |
puts "email #{@count.incrementAndGet} sent" | |
end | |
end |