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
package org.dummy.jmhbench | |
object FeatureFlags { | |
val enabled: String = System.getenv("FEATURE-FLAG-ENABLED") ?: "false" | |
val enabledT: Boolean = enabled.toBoolean() | |
fun viaFunction(): String { | |
return System.getenv("FEATURE-FLAG-ENABLED") ?: "false" | |
} |
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
# better handle tonumber errors | |
def parseCpu($cpu): ( | |
if ($cpu == null) then | |
$cpu | |
else | |
(if ($cpu|endswith("m")) then | |
($cpu|rtrimstr("m")|tonumber)/1000 | |
else | |
($cpu|tonumber)/1 | |
end) |
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
// string sanitization? | |
function t(n) { | |
for (var t, i = [], r = 0; r < n.length; r++) | |
t = n.charCodeAt(r), | |
t < 128 | |
? i.push(t) | |
: t < 2048 | |
? i.push(192 | t >> 6, 128 | t & 63) | |
: t < 55296 || t >= 57344 | |
? i.push(224 | t >> 12, 128 | t >> 6 & 63, 128 | t & 63) |
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
import org.asynchttpclient.DefaultAsyncHttpClient | |
import org.asynchttpclient.DefaultAsyncHttpClientConfig | |
import org.asynchttpclient.RequestBuilder | |
import org.asynchttpclient.Response | |
import org.junit.Ignore | |
import org.junit.Test | |
import java.io.IOException | |
@Ignore | |
class TestClientTimeout { |
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
brew install python@3.11 | |
python3.11 -m pip install cmdstanpy | |
python3.11 -m pip install prophet # this should work ? if it dont, good luck lmao | |
# at this point, you might get an error | |
# RuntimeError: Error during optimization! Command '/opt/homebrew/lib/python3.11/site-packages/prophet/stan_model/prophet_model.bin | |
# dyld[71677]: Library not loaded: '@rpath/libtbb.dylib' | |
cd /opt/homebrew/lib/python3.11/site-packages/prophet/stan_model | |
install_name_tool -add_rpath @executable_path/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb prophet_model.bin | |
# 'Prophet.fit' should no longer throw a fit haha |
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 python3 | |
import email | |
import email.header | |
import email.message | |
import email.utils | |
import hashlib | |
import json | |
import os | |
import quopri |
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
# kangeth homebrew somewhat: https://github.com/Homebrew/homebrew-core/blob/b5cb06cdea07ccb18fdf4a186148cfd3db23e874/Formula/sqlite.rb | |
env CPPFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_MAX_VARIABLE_NUMBER=250000" \ | |
./configure \ | |
--prefix=$HOME/works/unix/binaries/sqlite \ | |
--enable-dynamic-extensions \ | |
--enable-readline \ | |
--disable-editline \ | |
--enable-session | |
make install |
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 | |
set -euo pipefail | |
if [[ $# -eq 2 ]]; then | |
upstream="$1" | |
topic="$2" | |
elif [[ $# -eq 1 ]]; then |
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
000 0x00 NUL // Null | |
001 0x01 SOH // Start Of Heading | |
002 0x02 STX // Start Of Text | |
003 0x03 ETX // End Of Text | |
004 0x04 EOT // End Of Transmit | |
005 0x05 ENQ // Enquiry | |
006 0x06 ACK // Acknowledge | |
007 0x07 BEL // Bell | |
008 0x08 BS // Backspace | |
009 0x09 TAB // Horizontal Tab |
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
function listUpcomingEventsInternal(today, calendarId, colorMap, targets) { | |
var startOfWeek = new Date(today); | |
startOfWeek.setHours(0, 0, 0, 0); | |
if (startOfWeek.getDay() !== 1) { | |
startOfWeek.setHours(-24 * (startOfWeek.getDay() - 1)); | |
} | |
var endOfWeek = new Date(startOfWeek); | |
endOfWeek.setHours(+24 * 7); | |
var optionalArgs = { | |
timeMin: startOfWeek.toISOString(), |