Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Matching the parens

Olim Saidov olimsaidov

💻
Matching the parens
View GitHub Profile
View download-fitbit-data.clj
(require '[babashka.curl :as curl])
(require '[cheshire.core :as json])
(require '[clojure.java.io :as io])
(require '[clojure.string :as str])
(import 'java.time.YearMonth)
(def bearer-token
"eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIyMjhUUUQiLCJzdWIiOiI0VkNOVjYiLCJ4YWkiOiI1NTExNTU4OTU5MzIiLCJ4dmVyIjoiMCIsImlzcyI6IkZpdGJpdCIsInR5cCI6ImFjY2Vzc190b2tlbiIsInNjb3BlcyI6IndociB3bnV0IHdwcm8gd3NsZSB3d2VpIHdtZmEgd3NvYyB3YWN0IHdzZXQgd2xvYyIsImV4cCI6MTYxNTAwNjg3NCwiaWF0IjoxNjE0ODM0MDc0fQ.FdaLszvp6vS4K5kUQ06ylOF_25y_rE0AbsFuMIke4tc")
@olimsaidov
olimsaidov / yeelight.clj
Created Jan 14, 2021
Clojure YeeLight Controller
View yeelight.clj
#!/usr/bin/env bb
(ns app.yeelight
(:import [java.net DatagramPacket DatagramSocket
InetAddress URI Socket])
(:require [clojure.string :as str]
[clojure.walk :as walk]
[clojure.java.io :as io]
[cheshire.core :as json]
[clojure.tools.cli :as cli]))
@olimsaidov
olimsaidov / Geatest.php
Created Sep 8, 2016
Doctrine Greatest Function
View Geatest.php
<?php
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\AST\Node;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
class Greatest extends FunctionNode
{