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
du -h / | sort -n | grep -P '^(\d+?| \d+?|\d,\d)G' |
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
sed 's/.*\///' |
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/bash | |
$@ | |
say "DIIING! executed $1" |
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
public class Time { | |
public static void main(String[] args) { | |
System.out.println(System.currentTimeMillis()); | |
} | |
} |
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
Allt ska bort! | |
Skänkes mot hämtning: | |
Köksartiklar | |
- Bestick | |
- Tallrikar | |
- Stekpannor | |
- etc. | |
Hylla, vit: http://www.ikea.com/se/sv/catalog/products/50102157/#/00134052 | |
Taklampa |
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
(defn run-db-tests [db] | |
(fact "should get password that gets stored" | |
(.put-password db "email" "password") | |
(.get-password db "email") => "password")) | |
(fact "all db tests should be true" | |
(every? true? (map run-db-tests [(memory/get-instance)])) => true) |
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
set -e | |
set -u | |
cd $SPLUNK_HOME/etc/apps/shuttl/bin | |
bucket="$1" | |
source java_executable.env | |
$JAVA -cp ./*:../lib/* com.splunk.shuttl.archiver.copy.ColdCopyEntryPoint "$bucket" & |
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
;; Context: I'm using datascript and representing a Component as an entity. | |
;; Discovered a few problems when trying to nest components. | |
;; Problem 1: | |
;; When this EntityComponent is updated, it tries to read :db/id :person/name | |
;; and :person/likes. | |
;; Without context (like entity id in this case) those attributes may match many entries. | |
;; | |
;; Question: | |
;; Would it make sense to (assoc env :ident (ident c (props c))) in om/default-ui->props so |
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
;; Garden style css (just uses css properties as keywords as you'd expect): | |
[:style (css {:border-width "1px"})] | |
;; React cljs (camel cased css property names): | |
[:div {:style #js {:borderWidth "1px"}}] | |
;; Why camel case? "[...] This is consistent with the DOM style JavaScript property", see: https://facebook.github.io/react/docs/dom-differences.html | |
;; Problem: Cannot share code between inline css and react. |
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
I'm trying to implement optimistic updates using om.next, datascript and datomic. Mutations should be visible instantly in the UI (the optimistic part) and synced with datomic once the mutation has been successfully transacted. Mutations should also be retryable. | |
I might be going about this all wrong, but here's the way I'm going about it: | |
Client: | |
0. Call om/transact with a mutation `[(my/mutation { ... }) :read/this...] | |
1. Transact update to datascript and save the optimistic transaction's tx number. | |
2. Pass the optimistic tx number in the remote's ast's :params (more on this later). | |
Server: | |
3. Transact update to datomic returning entities created in datomic and the optimistic tx number from :params, to client. | |
Client: |
OlderNewer