I hereby claim:
- I am pithyless on github.
- I am pithyless (https://keybase.io/pithyless) on keybase.
- I have a public key ASAXUfguy_endzUnkeC8v1Gc1dOmBl6wgRunTYVSyUlnOAo
To claim this, I am signing this object:
class Integer | |
N_BYTES = [42].pack('i').size | |
N_BITS = N_BYTES * 16 | |
MAX = 2 ** (N_BITS - 2) - 1 | |
MIN = -MAX - 1 | |
end | |
p Integer::MAX #=> 4611686018427387903 | |
p Integer::MAX.class #=> Fixnum | |
p (Integer::MAX + 1).class #=> Bignum |
Step 1: install flac via Homebrew | |
brew install flac | |
Step 2: decode FLAC to AIFF | |
cd path/to/directory/with/files/to/convert | |
for i in *.flac; do | |
flac -d --force-aiff-format "$i" | |
done |
(ns my.util.namespace | |
#?(:cljs (:require-macros [my.util.namespace])) | |
(:require | |
#?(:clj [potemkin :as potemkin]))) | |
(defmacro cljs-import-vars [& syms] | |
(let [unravel (fn unravel [x] | |
(if (sequential? x) | |
(->> x |
(ns front.utilities.i18n-impl | |
(:require [front.i18n])) | |
(defn build-domain-index [text-vec] | |
(let [by-msgid (atom (transient {})) | |
by-msg (atom (transient {}))] | |
(doseq [{:keys [s_message s_message_id] :as text} text-vec] | |
(when-not (clojure.string/blank? s_message_id) | |
(swap! by-msgid assoc! s_message_id text)) | |
(when-not (clojure.string/blank? s_message) |
// jQuery Headers support for $.ajax | |
$.ajax({ | |
beforeSend: function(xhrObj){ | |
xhrObj.setRequestHeader("Content-Type","application/json"); | |
xhrObj.setRequestHeader("Accept","application/json"); | |
} | |
type: "POST", | |
url: "/article", | |
processData: false, |
/** | |
* See: http://www.css-101.org/articles/ken-burns_effect/css-transition.php | |
*/ | |
/** | |
* Styling the container (the wrapper) | |
* | |
* position is used to make this box a containing block (it becomes a reference for its absolutely positioned children). overflow will hide part of the images moving outside of the box. | |
*/ |
I hereby claim:
To claim this, I am signing this object:
require 'flog' | |
require 'flog_task' | |
require 'flay' | |
require 'flay_task' | |
require 'roodi' | |
require 'roodi_task' | |
FlogTask.new :flog, SOME_NUMBER_HERE, %w[app lib] | |
FlayTask.new :flay, OTHER_NUMBER_HERE, %w[app lib] | |
RoodiTask.new 'roodi', ['app/**/*.rb', 'lib/**/*.rb'] |
# A chainable Either monad for Ruby | |
# | |
# Examples | |
# | |
# Either.right('s') >> proc { |s| Either.right(s + '-1') } >> proc { |s| Either.right(s + '-2') } | |
# #=> #<Either @left=nil, @right="s-1-2"> | |
# | |
# Either.right('s') >> proc { |s| Either.left('error!') } >> proc { |s| Either.right(s + '-2') } | |
# #=> #<Either @left='error!', @right=nil> | |
# |
Some of Django's choices on how to handle data integrity are wrong, or at the very least, unexpected to the uninitiated developers. I'm not here to pass judgement; like many people, I'd just like to get back to doing real work. Some notes on how to stay safe in Django:
is_valid()
performs model validation automaticallyfull_clean()
is never actually called by Django (see ticket #13100)