Skip to content

Instantly share code, notes, and snippets.

# Determines whether or not to cache a dataset based on the configuration
# settings of the plugin.
#--
# TODO: Specify a place to find those settings. However, where those are
# applied is currently in flux. Also, further document how this process
# actually works.
#++
def is_cacheable_by_default?
cache_by_default = cache_options[:cache_by_default]
return false unless cache_by_default
### Keybase proof
I hereby claim:
* I am dphase on github.
* I am dphase (https://keybase.io/dphase) on keybase.
* I have a public key whose fingerprint is 3D04 D57C AF3C 125E 0722 E180 D53B 5FE8 A864 2F2A
To claim this, I am signing this object:
# ╔═════════════════════════════════════╦═══════════════════════════════╗
# ║ _ ____ _ ║ _ ║─┐
# ║ __| | _ \| |__ __ _ ___ ___ ║ | |_ _ __ ___ _ ___ __ ║ │
# ║ / _` | |_) | '_ \ / _` / __|/ _ \ ║ | __| '_ ` _ \| | | \ \/ / ║ │
# ║ | (_| | __/| | | | (_| \__ \ __/ ║ | |_| | | | | | |_| |> < ║ │
# ║ \__,_|_| |_| |_|\__,_|___/\___| ║ \__|_| |_| |_|\__,_/_/\_\ ║ │
# ║ ║ ║ │
# ╚═════════════════════════════════════╩═══════════════════════════════╝ │
# └──────────────────────────────────────────────────────────────────────┘
" ---------------------------------------------------------------------------------
" Spotify Client for Vim
" © #iMPULSE
" ---------------------------------------------------------------------------------
if exists('g:vim_spotify_loaded') || &cp
finish
endif
let g:vim_spotify_loaded = 1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.17647059261798859</real>
<key>Green Component</key>
<real>0.17647059261798859</real>
#!/usr/bin/env ruby
# ---------------------------------------------------------------------------------
# Ruby Fun Times
# © #iMPULSE2013
#
# Given a 20x20 matrix representing a map or coordinates, plot 5000 points
# containing random values between 1-10. Implement a merge sort on the uniq values
# and split list into 5 groups, with each group representing a color for the
# heatmap coord. Finally, render the colorized heatmap to stdout.
# ---------------------------------------------------------------------------------
" =============================================================================
" Filename: autoload/lightline/colorscheme/dphase.vim
" Author: dphase
" =============================================================================
let s:black = '#000000'
let s:darkgrey = '#383838'
let s:errorbg = '#e25154'
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
An exception occurred running /Users/dphase/.rvm/gems/rbx-2.0.0/bin/padrino:
Error trying to compile /Users/dphase/.rvm/gems/rbx-2.0.0/gems/padrino-core-0.11.4/lib/padrino-core/application.rb/Users/dphase/.rvm/gems/rbx-2.0.0/gems/padrino-core-0.11.4/lib/padrino-core/application.rb (Rubinius::ToolSet::Runtime::CompileError)
Backtrace:
Rubinius::ToolSet::Runtime::Compiler.compiler_error at /Users/dphase/.rvm/rubies/rbx-2.0.0/runtime/gems
/rubinius-compiler-2.0.4/lib/rubinius/compiler
/compiler.rbc:13
Rubinius::ToolSet::Runtime::Compiler.compile at /Users/dphase/.rvm/rubies/rbx-2.0.0/runtime/gems
@dphase
dphase / warpshadow.rb
Last active December 11, 2015 21:48
UIBezierPath Warped Shadow for RubyMotion, idea from http://nscookbook.com/2013/01/ios-programming-recipe-10-adding-a-shadow-to-uiview/
# =================================
# = Warped shadow for any CGLayer =
# =================================
def warpShadow(rect, offset)
size = rect.size
path = UIBezierPath.bezierPath
# Top/Right: ````|
path.moveToPoint([offset, offset])
path.addLineToPoint([size.width - offset, offset])
@dphase
dphase / Custom.css
Created December 31, 2012 03:24
Custom colors for Chrome Webkit Inspector
/* ==================== */
/* = dphase additions = */
/* ==================== */
#-webkit-web-inspector .console-info,
#-webkit-web-inspector .console-object-preview,
#-webkit-web-inspector .section .header .title.blank-title,
#-webkit-web-inspector .pane > .body .info,
#-webkit-web-inspector .resource-content-unavailable {
font-style: normal !important;
}