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
| { | |
| "description": "Caps Lock to Command, Swap Command and Option", | |
| "manipulators": [ | |
| { | |
| "from": { | |
| "key_code": "caps_lock", | |
| "modifiers": { "optional": ["any"] } | |
| }, | |
| "to": [{ "key_code": "left_command" }], | |
| "to_if_alone": [{ "key_code": "escape" }], |
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
| #| | |
| This minimal config changes Caps Lock to act as Escape on quick tap, but | |
| if held, it will act as Left Ctrl. It also changes the tab key to | |
| act as tab on quick tap, but change hjkl keys to arrow keys on hold. | |
| |# | |
| (defcfg | |
| #| | |
| This configuration will process all keys pressed inside of kanata, even if | |
| they are not mapped in defsrc. This is so that certain actions can activate |
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
| echo '#!/bin/bash | |
| tail -f /Users/raghav/deskflow.log | awk \'/leaving screen/{system("/Library/Application\\ Support/org.pqrs/Karabiner-Elements/bin/karabiner_cli --select-profile \"Disabled\"")} /entering screen/{system("/Library/Application\\ Support/org.pqrs/Karabiner-Elements/bin/karabiner_cli --select-profile \"Default profile\"")}\'' > ~/karabiner-profile-switch.sh |
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
| #| | |
| This minimal config changes Caps Lock to act as Escape on quick tap, but | |
| if held, it will act as Left Ctrl. It also changes the tab key to | |
| act as tab on quick tap, but change hjkl keys to arrow keys on hold. | |
| |# | |
| (defcfg | |
| #| | |
| This configuration will process all keys pressed inside of kanata, even if | |
| they are not mapped in defsrc. This is so that certain actions can activate |
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
| (require '[clojure.string :as str]) | |
| (def colors ["red" "blue" "yellow" "green" "purple" "pink"]) | |
| (defn secret | |
| [colors] | |
| (mapv (fn [_] (rand-nth colors)) (range 4))) | |
| (defn match | |
| [secret color-input index] | |
| (cond |
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
| (ns lisp_parser | |
| (:require [clojure.string :as str])) | |
| (declare tokenize-expression) | |
| (defmulti ^:private parse-tokens | |
| "Dispatches based on the first element in the token collection" | |
| (fn [[token & _]] | |
| (when (contains? #{"}" "]" ")"} token) ;; If code str is starting with ending brackets, throw error. | |
| (throw (Exception. (str "Unmatched delimiter: " token)))) |
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
| (ns cracklepop) | |
| (defn ^:private crackle-pop | |
| "Accepts a number and checks if it meets the criteria for CracklePop. | |
| If the number is divisible by 3, return 'Crackle'. | |
| If the number is divisible by 5, return 'Pop'. | |
| If the number is divisible by both 3 and 5, return 'CracklePop'. | |
| If none of the above conditions meet, return the number." | |
| [n] | |
| (let [divisible? (comp zero? mod)] |
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
| Requirements: | |
| Python 2.7 | |
| How to run: | |
| python webserver.py | |
| Test using cURL: | |
| Create connection: | |
| curl -i -X GET "http://localhost:8080/api/request?connId=1&timeout=5" |
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
| import requests | |
| import re | |
| import time | |
| import csv | |
| from urllib import urlretrieve | |
| from bs4 import BeautifulSoup | |
| bookURLs = [] |