~/nixfiles (master)$ NIX_PATH=nixpkgs=https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz nix-build '<nixpkgs>' -A chromium
downloading ‘https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz’... ^[[1D [0/0 KiB, 0.0 KiB/s]^[[21D [0/7517 KiB, 0.0 KiB/s]^[[24D [464/7517 KiB, 213.4 KiB/s]^[[28D [4592/7517 KiB, 1446.4 KiB/s]
unpacking ‘https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz’... |
these derivations will be built: |
/nix/store/l9z7lw7a9kfy1535x36cqpg5ki63sijc-chromium-52.0.2743.116.drv |
This file contains 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
Installation steps (untested, sorry no CentOS machine) | |
install file at /etc/init.d/marmalade | |
change PATH TO NODE BINARY | |
change PATH TO MARMALADE | |
change user if desired | |
#add script to rc.d | |
sudo chkconfig --add marmalade |
This file contains 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
ryantm@home1 ~/p/nixpkgs-channels (nixos-unstable)$ nix-env -f . -iA opencc | |
installing ‘opencc-1.0.3’ | |
these derivations will be built: | |
/nix/store/r8wz0kfj5k999cy09p0spwh4sqili730-opencc-1.0.3.drv | |
building path(s) ‘/nix/store/h8iicppcd1i9jcww2iw81gmdk98dxrka-opencc-1.0.3’ | |
unpacking sources | |
unpacking source archive /nix/store/9066ds73yqsa7lgfllgxmx1aclyk4grl-ver.1.0.3.tar.gz | |
source root is OpenCC-ver.1.0.3 | |
patching sources | |
configuring |
This file contains 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
(defn doc-from-ns-form | |
"Extract the docstring from a given ns form without evaluating the form. The docstring returned should be the return value of (:doc (meta namespace-symbol)) if the ns-form were to be evaluated." | |
[ns-form] | |
(let [meta-docstring (:doc (meta (second ns-form))) | |
references (next (next ns-form)) | |
docstring (when (string? (first references)) (first references)) | |
references (if docstring (next references) references) | |
attribute-docstring (:doc (when (map? (first references)) (first references)))] | |
(or attribute-docstring docstring meta-docstring))) |
This file contains 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
(defun <-running-version (version) | |
(let* ((split-version (split-string version "\\.")) | |
(major-version (string-to-number (first split-version))) | |
(minor-version (string-to-number (second split-version)))) | |
(or (< major-version emacs-major-version) | |
(and (eq major-version emacs-major-version) | |
(< minor-version emacs-minor-version))))) | |
(defmacro call-obsolete-function (name new-name when &rest rest) | |
(let ((function-name (if (<-running-version when) |
This file contains 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
(let ((vars nil)) (mapatoms (lambda (atom) (when (get atom 'safe-local-variable) (push atom vars)))) vars) |
This file contains 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 = 1 | |
puts local_variables.inspect #=> [:a] | |
proc { |;a| | |
puts local_variables.inspect #=> [:a,:a,:a] | |
}.call |
This file contains 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
{-# LANGUAGE FunctionalDepedencies #-} | |
data Account | |
= Account {accountId :: !Int, | |
productCd :: !String, | |
custId :: !Int, | |
openDate :: !Day, | |
closeDate :: !(Maybe Day), | |
lastActivityDate :: !(Maybe Day), | |
status :: !String, |
This file contains 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
{-# LANGUAGE DataKinds, KindSignatures, MultiParamTypeClasses, | |
FunctionalDependencies, FlexibleInstances, | |
OverloadedLabels, ScopedTypeVariables, | |
TemplateHaskell #-} | |
import Test2 | |
--instance Has Point "x" Int where from (Point x _) _ = x | |
deriveI "x" | |
example = #x (Point 1 2) |
This file contains 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
g.hs:13:1: error: | |
• Could not deduce (Show a1) arising from a use of ‘showsPrec’ | |
from the context: Show a | |
bound by the instance declaration at g.hs:13:1-41 | |
or from: a ~ (a1, a1) | |
bound by a pattern with constructor: | |
Pair :: forall a. Term a -> Term a -> Term (a, a), | |
in an equation for ‘showsPrec’ | |
at g.hs:13:1-41 | |
Possible fix: |