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
# Log all commands in zsh to files | |
export PROMPT_COMMAND='if [ "$(id -u)" -ne 0 ]; then echo "$(date "+%Y-%m-%d.%H:%M:%S") $(pwd) $(history | tail -n 1)" >> ~/.logs/bash-history-$(date "+%Y-%m-%d").log; fi' | |
prmptcmd() { eval "$PROMPT_COMMAND" } | |
precmd_functions=($precmd_functions prmptcmd) |
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
(require '[clojure.spec :as sp]) | |
(defn dependencies [spec] | |
(let [deps (atom [])] | |
(clojure.walk/prewalk | |
(fn [x] | |
(if ((sp/registry) x) | |
(do (swap! deps conj x) | |
(sp/form x)) | |
x)) |
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
(ns cljs-hello.debounce | |
(:require-macros [cljs.core.async.macros :refer [go]]) | |
(:require [reagent.core :as r] | |
[cljs.core.async :refer [>! <! chan sliding-buffer timeout]])) | |
(defn button | |
[text on-click-callback] | |
[:div | |
[:p | |
[:button {:class "btn btn-info btn-lg" |
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
(ns playsync.pipeline | |
(:require [clojure.core.async | |
:as a | |
:refer [>! <! >!! <!! go chan buffer close! thread alts! alts!! timeout alt! pipeline-async]] | |
[clojure.tools.logging :as log])) | |
(defn api-call | |
[success-rate] | |
(do | |
(Thread/sleep (+ 100 (rand-int 200))) |
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
#include <stdio.h> | |
void generate(int n, char set[27], int n1, char s[27]/*, char c[27],int count*/) | |
{ | |
int i, j; | |
char c; | |
if(n1 == 1){ | |
for(i = 0; i < 26; i++){ | |
if(set[i] != '#'){ | |
for(j = 0; j < n-1; j++) | |
printf("%c",s[j]); |