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
:root { | |
--grey50: #A0A0A0; | |
--grey75: #C0C0C0; | |
--grey90: #E0E0E0; | |
--opacity: 1; | |
} | |
.ytp-gradient-bottom { display: none; } | |
.ytp-cairo-refresh-signature-moments .ytp-play-progress { background: #F00; } | |
.ytp-button[data-tooltip-target-id=ytp-autonav-toggle-button], |
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 pie-a-la-mode) | |
;; Concurrency example from The Pragmatic Programmers. Waiters check if there's | |
;; enough pie and ice cream before they sell an order, but if they don't | |
;; coordinate it's still possible to sell more than we have. | |
;; | |
;; The below code should return either :ok or :not-available for a given order. | |
;; If we oversell, then it will throw an exception. | |
;; | |
;; How would you change this to ensure that that doesn't happen? |
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
aabacadaeafagahaiajakalamanaoapaqarasatauavawaxayaza | |
babbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwbxbybzb | |
cacbccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxcyczc | |
dadbdcddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd | |
eaebecedeefegeheiejekelemeneoepeqereseteuevewexeyeze | |
fafbfcfdfeffgfhfifjfkflfmfnfofpfqfrfsftfufvfwfxfyfzf | |
gagbgcgdgegfgghgigjgkglgmgngogpgqgrgsgtgugvgwgxgygzg | |
hahbhchdhehfhghhihjhkhlhmhnhohphqhrhshthuhvhwhxhyhzh | |
iaibicidieifigihiijikiliminioipiqirisitiuiviwixiyizi | |
jajbjcjdjejfjgjhjijjkjljmjnjojpjrjsjtjujvjwjxjyjzj |
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("hs.hotkey") | |
require("hs.keycodes") | |
hs.hotkey.bind({}, "F13", function() | |
-- hs.keycodes.currentSourceID("me.tonsky.keyboardlayout.helix.english-helix") | |
hs.keycodes.setLayout("English - Helix") | |
end) | |
hs.hotkey.bind({}, "F14", function() | |
-- hs.keycodes.currentSourceID("me.tonsky.keyboardlayout.helix.russian-helix") |
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
top10Salaries :: FilePath -> IO () | |
top10Salaries path = do | |
Just (h, t) <- uncons . T.lines <$> T.readFile path | |
let | |
split = T.splitOn "," | |
Just ind = elemIndex "Salary" $ split h | |
top10 :: [Int] = t | |
& map (\s -> read $ T.unpack $ split s !! ind) | |
& sortBy (flip compare) | |
& take 10 |
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
- Types of reuse | |
- Layer | |
- Completely abstracts underlying problem. Your code calls layer | |
- Assume singleton, can conflict with another layer | |
- Engine | |
- Orchestrates whole app Engine calls you | |
- Component | |
- You call component, but component might call you back | |
- Most benefits, hardest to design | |
- Optimization axes |
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
package fitnesse.html; | |
import fitnesse.responders.run.SuiteResponder; | |
import fitnesse.wiki.*; | |
public class SetupTeardownIncluder { | |
public static String render(PageData pageData, boolean isSuite) throws Exception { | |
StringBuilder sb = new StringBuilder(); | |
WikiPage testPage = pageData.getWikiPage(); | |
if (pageData.hasAttribute("Test")) { |
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
(defn end? [[x1 x2 x3 x4 x5 x6 x7 x8 x9]] | |
(or | |
(and (some? x1) (= x1 x2 x3)) | |
(and (some? x4) (= x4 x5 x6)) | |
(and (some? x7) (= x7 x8 x9)) | |
(and (some? x1) (= x1 x4 x7)) | |
(and (some? x2) (= x2 x5 x8)) | |
(and (some? x3) (= x3 x6 x9)) | |
(and (some? x1) (= x1 x5 x9)) | |
(and (some? x3) (= x3 x5 x7)) |
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
package com.example.onair | |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.compose.* | |
import androidx.ui.core.Text | |
import androidx.ui.core.dp | |
import androidx.ui.core.setContent | |
import androidx.ui.foundation.Clickable | |
import androidx.ui.foundation.ColoredRect |
NewerOlder