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
const Comp3 = ({item}) => { | |
return( | |
<div>simple return</div> | |
) | |
} | |
const Comp2 = ({data}) => { | |
return( | |
<React.Fragment> |
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
version: '3.1' | |
services: | |
app: | |
depends_on: | |
- db | |
image: wordpress:latest | |
ports: | |
- 8000:80 | |
environment: |
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
# Create | |
git tag -a tag-name -m "tag message" | |
# Push | |
git push --tags |
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
# Local | |
git tag -d tag-name | |
# Remote | |
git push --delete origin tag-name |
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
;; write | |
(def write-bs | |
(let [baos (java.io.ByteArrayOutputStream.)] | |
(with-open [oos (java.io.ObjectOutputStream. baos)] | |
(.writeObject oos "hello")) | |
(.toByteArray baos))) | |
;; read bs | |
(defn read-bs | |
[bs] |
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
#!/bin/bash | |
function tmux-attach(){ | |
SESSION_NAME=$1 | |
tmux attach -t $SESSION_NAME | |
} | |
function tmux-new(){ | |
SESSION_NAME=$1 | |
tmux new -s $SESSION_NAME |
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
;; (replace value regex replacement) |
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
(def my-atom (atom nil)) | |
;; @my-atom | |
;; nil | |
(defn update-my-atom [value] (reset! my-atom value)) | |
@my-atom | |
;; nil | |
(update-my-atom 10) | |
;; 10 | |
@my-atom | |
;; 10 |
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
;; defmacro | |
;; only run at compile time | |
;; Simple | |
(defmacro unless [condition expression] | |
(list 'if condition nil expression)) | |
(unless (> 2 3) true) | |
;; (if (> 2 3) true nil) |
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
;; Vector | |
(def my-vector [1 2 3]) | |
(let [[x y z] my-vector] | |
(+ x y z)) | |
;; 6 | |
;; String | |
(def my-string "hola") |