I hereby claim:
- I am kommen on github.
- I am kommen (https://keybase.io/kommen) on keybase.
- I have a public key whose fingerprint is 2870 6088 7CB6 77E4 A7CD 145A 5DE6 A38A C816 E624
To claim this, I am signing this object:
(ns cljftp | |
(:require [clojure.java.io :as io]) | |
(:import [java.net URL])) | |
;; See also https://www.ietf.org/rfc/rfc1738.txt | |
;; a public FTP test server https://dlptest.com/ftp-test/ | |
(def ftp-url "ftp://dlpuser:[email protected]/") | |
(def file-name "test.txt") |
;; "forked" from @plexus' https://github.com/plexus/hoc-schedule/blob/25f8cf59e57a1d2177fb99b79f1f6fad2c9fc942/src/poor/hiccup.cljs | |
(ns poor.hiccup | |
(:require [goog.dom :as gdom] | |
[clojure.string :as str])) | |
(defn split-tag [tag] | |
(let [tag (name tag) | |
parts (str/split tag #"\.")] | |
[(first parts) |
#!/bin/bash | |
abs_bin_dir="$(cd "$(dirname "$0")" && pwd)" | |
FILE="${abs_bin_dir}/zprint-filter-0.4.4" | |
# check if zprint server port is reachable | |
ncat -z 127.0.0.1 7877 | |
if [ $? == 0 ]; then | |
ncat 127.0.0.1 7877 <&0 |
defmodule Mp3Info do | |
def duration(data) do | |
compute_duration(data, 0, 0) | |
end | |
defp compute_duration(data, offset, duration) when byte_size(data) > offset do | |
case decode_header_at_offset(offset, data) do | |
{:ok, length, {samplerate, samples}} -> | |
compute_duration(data, offset + length, duration + (samples / samplerate)) |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
- (void) queueViewControllerTransition:(BOOL)show { | |
static dispatch_queue_t presentAndDismissViewControllerQueue; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
presentAndDismissViewControllerQueue = dispatch_queue_create("presentAndDismissViewControllerQueue", DISPATCH_QUEUE_SERIAL); | |
}); | |
dispatch_async(presentAndDismissViewControllerQueue, ^{ | |
dispatch_semaphore_t sema = dispatch_semaphore_create(0); | |
dispatch_async(dispatch_get_main_queue(), ^{ |
-- Based on http://pgsql.tapoueh.org/site/html/news/20080131.bloat.html | |
-- see that linked version for detailed table and index listings on where that bloat is | |
SELECT pg_size_pretty(SUM(bs*(relpages-otta))::bigint) AS wastedsize, | |
pg_size_pretty(SUM(CASE WHEN ipages < iotta THEN 0 ELSE bs*(ipages-iotta) END)::bigint) AS wastedisize | |
FROM ( | |
SELECT | |
schemaname, tablename, cc.reltuples, cc.relpages, bs, | |
CEIL((cc.reltuples*((datahdr+ma- | |
(CASE WHEN datahdr%ma=0 THEN ma ELSE datahdr%ma END))+nullhdr2+4))/(bs-20::float)) AS otta, | |
COALESCE(c2.relname,'?') AS iname, COALESCE(c2.reltuples,0) AS ituples, COALESCE(c2.relpages,0) AS ipages, |
$ ruby -v | |
ruby 2.0.0dev (2012-12-01 trunk 38126) [x86_64-darwin12.2.0] | |
$ irb | |
irb(main):001:0> Date | |
=> Date | |
irb(main):002:0> Date.today | |
NoMethodError: undefined method `today' for Date:Class | |
from (irb):2 | |
from /Users/kommen/.rbenv/versions/2.0.0-preview2/bin/irb:12:in `<main>' | |
irb(main):003:0> require 'date' |
set :branch, "origin/#{ENV['BRANCH'] || "master"}" | |
namespace :assets do | |
desc "Precompile rails 3.1 assets" | |
task :precompile, :except => { :no_release => true } do | |
asset_paths = "app/assets lib/assets vendor/assets" | |
if !ENV['FORCE_PRECOMPILE'].nil? || capture("cd #{current_path}; git diff-tree --name-only -r #{deployed_revision} HEAD #{asset_paths} | wc -l").strip.to_i > 0 | |
deploy.precompile_assets | |
else | |
logger.info "Skipping asset pre-compilation because there were no asset changes" |