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 [awaitility-clj.core :refer [wait-for]]) | |
(let [start-time (System/currentTimeMillis) | |
end-time (+ start-time 200)] | |
(wait-for {:at-most [1 :seconds]} ; options such as at-most and poll-interval | |
(fn [] (>= (System/currentTimeMillis) end-time)))) ; function that will eventually return true |
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 check-reactor-is-ready | |
[] | |
(let [counter (Math/random)] | |
(println (str "Reading is... " counter)) | |
(> counter 0.5))) |
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
#!/usr/bin/env bash | |
printf "\n --- $2\n" | |
git clone "$1" $2 && | |
printf "\nCommits on Master: $(cd $2 && git rev-list --count master 2>&1 && cd ..)" && | |
printf "\nFirst commit: $(cd $2 && git log --pretty=format:"%h %an %cD %s" --reverse | head -n1 2>&1 && cd ..)\n" && | |
printf "\nLines of code:\n\n" && | |
cloc $2 && | |
printf "\nDependencies:\n\n" && | |
printf "Clojure: \n$(cd $2 && lein licenses || echo "N/A" 2>&1 && cd ..)\n\n" || true && | |
printf "Javascript: \n$(cd $2 && npm i --silent --no-progress && npx license-report --only=prod --output=csv --fields=name --fields=installedVersion --fields=licenseType || echo "N/A" 2>&1 && cd ..)\n\n" || true && |
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
[time] | |
disabled = false | |
format = '[$time]($style) ' | |
utc_time_offset = "local" | |
[directory] | |
truncation_length = 8 | |
truncate_to_repo = false | |
[env_var] |
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
SetDefaultKeyboard(LocaleID){ | |
Static SPI_SETDEFAULTINPUTLANG := 0x005A, SPIF_SENDWININICHANGE := 2 | |
Lan := DllCall("LoadKeyboardLayout", "Str", Format("{:08x}", LocaleID), "Int", 0) | |
VarSetCapacity(binaryLocaleID, 4, 0) | |
NumPut(LocaleID, binaryLocaleID) | |
DllCall("SystemParametersInfo", "UInt", SPI_SETDEFAULTINPUTLANG, "UInt", 0, "UPtr", &binaryLocaleID, "UInt", SPIF_SENDWININICHANGE) | |
WinGet, windows, List | |
Loop % windows { |
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
* { | |
color: #928374 !important; | |
background-color: #282828 !important; | |
} | |
body > center > table > tbody > tr:first-child * { | |
background-color: #504945 !important; | |
} | |
body > center > table > tbody > tr:first-child * a:hover { | |
background: #3c3836 !important; | |
} |
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 divisible? | |
[divisor number] | |
(zero? (mod number divisor))) | |
(defn fizzbuzz | |
[number] | |
(cond (divisible? 15 number) "fizzbuzz" | |
(divisible? 5 number) "buzz" | |
(divisible? 3 number) "fizz" | |
:else (str number))) |
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 liberator-examples.core | |
(:require | |
[ring.adapter.jetty :as ring-jetty] | |
[ring.middleware.defaults :as ring-defaults] | |
[liberator-examples.hello-world.resource :as resource]) | |
(:gen-class)) |
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 | |
LANGUAGE="en_US" | |
app_name="Spotify" | |
current_sink_num= | |
sink_num_check= | |
app_name_check= | |
pactl list sink-inputs |while read line; do \ | |
sink_num_check=$(echo "$line" |sed -rn 's/^Sink Input #(.*)/\1/p') | |
if [ "$sink_num_check" != "" ]; then | |
current_sink_num="$sink_num_check" |
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
# To the extent possible under law, the author(s) have dedicated all | |
# copyright and related and neighboring rights to this software to the | |
# public domain worldwide. This software is distributed without any warranty. | |
# You should have received a copy of the CC0 Public Domain Dedication along | |
# with this software. | |
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | |
# base-files version 4.2-3 | |
# ~/.bashrc: executed by bash(1) for interactive shells. |
NewerOlder