op | hash-map | sorted-map | hash-set | sorted-set | vector | queue | list | lazy seq |
---|---|---|---|---|---|---|---|---|
conj | log32n | log2n | log32n | log2n | 1 | 1 | 1 | 1 |
assoc | log32n | log2n | - | - | log32n | - | - | - |
dissoc | log32n | log2n | - | - | - | - | - | - |
disj | - | - | log32n | log2n | - | - | - | - |
nth | - | - | - | - | log32n | n | n | n |
get | log32n | log2n | log32 |
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 | |
=begin | |
To run, copy and paste the following command into a console: | |
ruby < <(curl -s https://raw.github.com/gist/1816919/469a4086833ce3b3496476aef1246c5d81b7ac99/gistfile1.rb) | |
And shucks, if that doesn't work, there's always this: | |
bash --version && \ | |
brew --version && \ | |
bundle --version && \ | |
curl --version && \ |
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
# Install RVM | |
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) | |
# Tell bash (the terminal) to automatically load RVM, then tell bash to reload | |
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile | |
source ~/.bash_profile | |
# Install the latest version of Ruby and set it as the default | |
rvm install 1.9.3 | |
rvm use 1.9.3 --default |
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/sh | |
# | |
# First install the latest Command Line Tools for Xcode package: | |
# https://developer.apple.com/downloads/index.action?name=command%20line%20tools%20for%20xcode | |
# | |
# You can then run this by either copying and pasting everything into a terminal or running: | |
# bash -s < <(curl -L https://raw.github.com/gist/2026768/konjac_env.sh) | |
# | |
# Install Homebrew |
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
# A purely .zsh method inspired by Steve Losh's Python script for displaying battery power with zsh: | |
# http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity | |
# | |
# For best results assign to RPROMPT | |
function battery_charge { | |
# Adjust to your preferred number of segments | |
typeset -i SEGMENTS | |
SEGMENTS=10 | |
# Get maximum and current capacity as floats via ioreg |
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
% bare minimum Japanese document for Mac | |
% | |
% build with: | |
% latexmk -pdf hoge.tex | |
\documentclass[11pt]{article} | |
\usepackage[top=0.5in, bottom=0.75in, left=0.75in, right=0.75in]{geometry} | |
\usepackage{xltxtra} | |
\XeTeXlinebreaklocale "ja" | |
\setmainfont[Mapping=tex-text]{Hiragino Mincho Pro W3} |
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/sh | |
# Run with | |
# curl -L https://raw.github.com/gist/3275691/changeInput.sh | sh | |
git clone git://gist.github.com/2146751.git changeInput | |
cd changeInput | |
gcc t.m -o changeInput -lobjc -framework foundation -framework carbon | |
cp changeInput ~/bin | |
# Then open Automator and create something like: | |
# Service |
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 | |
# To get a list of available albums: | |
# flickr_set.rb bryanmckelvey | |
# | |
# To download an album: | |
# flickr_set.rb bryanmckelvey "Fall 2011" | |
require "fleakr" | |
# Get an API key at http://www.flickr.com/services/apps/create/apply |
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
@echo off | |
rem List all running Java processes, excluding useless metrics | |
tasklist /fi "IMAGENAME eq javaw.exe" /fo LIST /v ^ | |
| find /v "Session" ^ | |
| find /v "User" ^ | |
| find /v "CPU" ^ | |
| find /v "Status" | |
echo. | |
:user_input |
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
' For when you want to preserve color indices when saving from Excel 2007+ to | |
' .xls format. Copy into PERSONAL.XLS or your worksheet and run with | |
' Alt+F11, Ctrl+G, ColorCells() | |
Private Const StartRow As Integer = 2 | |
Private Const StartCol As Integer = 2 | |
Private Const LastColorIndex As Integer = 56 | |
Public Sub ColorCells() | |
Dim i As Integer |
OlderNewer