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
/* | |
* Original requirement: | |
* if a > b, return 1, if a == b return 0, if a < b return -1 | |
*/ | |
/* | |
* Day 1 | |
* Paul comes in and does untested code which has a bug | |
*/ | |
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/python | |
import argparse, os, subprocess | |
# Grab the script directory to use as default | |
current_directory = os.path.dirname(os.path.abspath(__file__)) | |
def parse_cli_arguments(): | |
parser = argparse.ArgumentParser(description = 'Grabs all DNG files from the connected Android device\'s camera roll.') | |
parser.add_argument('--output-path', type = str, help = 'The path to download the DNGs to. Default: {script_path}/raw', |
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
operator fun <P1, P2, R> ((P1, P2) -> R).invoke(): (P1) -> (P2) -> R { | |
return {p1: P1 -> { p2: P2 -> this(p1, p2) } } | |
} | |
operator fun <P1, P2, P3, R> ((P1, P2, P3) -> R).invoke(): (P1) -> (P2) -> (P3) -> R { | |
return {p1: P1 -> { p2: P2 -> { p3: P3 -> this(p1, p2, p3) }}} | |
} | |
fun add(p1: Int, p2: Int): Int = p1 + p2 |
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 | |
# usage: nordvpn [server=nl21] [protocol=udp|tcp] | |
nordvpn() { | |
default_server="nl21" | |
default_protocol="udp" | |
# folder where you extracted the openvpn config files from https://nordvpn.com/api/files/zip | |
config_location="{$HOME}/path/to/your/config/folder" | |
server=${1:-$default_server} | |
protocol=${2:-$default_protocol} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<div> | |
<textarea id="hierarchy-text" cols="30" rows="10"> | |
+>DecorView{id=-1, visibility=VISIBLE, width=320, height=470, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=WM.LayoutParams{(0,0)(fillxfill) sim=#3 ty=1 fl=#81810100 pfl=0x20000 wanim=0x10302f6 needsMenuKey=2 colorMode=0}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} | |
| |
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
const WebSocket = require('ws'); | |
const base64 = require('base-64'); | |
// SETTINGS | |
const HOST = "127.0.0.1"; | |
const PORT = 3000; | |
const INTERVAL_IN_SECONDS = 10; | |
const TRIGGER_ALARM_IN_SECONDS = 10; | |
// DO NOT TOUCH AFTER THIS LINE |
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/sh | |
SELF=$(readlink -f "$0") | |
HERE=${SELF%/*} | |
export PATH="$HERE/bin:$PATH" | |
export ALSOFT_DRIVERS=pulse # not sure if necessary tbh | |
exec "yourgame" "$@" |
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 io.github.fourlastor.keys.lazylayout | |
import androidx.compose.foundation.ExperimentalFoundationApi | |
import androidx.compose.foundation.ScrollState | |
import androidx.compose.foundation.checkScrollableContainerConstraints | |
import androidx.compose.foundation.clipScrollableContainer | |
import androidx.compose.foundation.gestures.Orientation | |
import androidx.compose.foundation.gestures.scrollable | |
import androidx.compose.foundation.lazy.layout.LazyLayout | |
import androidx.compose.foundation.lazy.layout.LazyLayoutItemProvider |
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 io.github.fourlastor.game.level.component; | |
import com.badlogic.ashley.core.Component; | |
import com.badlogic.gdx.scenes.scene2d.Actor; | |
public class ActorComponent implements Component { | |
public final Actor actor; | |
public final Enum<?> layer; |
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
plugins { | |
alias(libs.plugin.myPlugin) | |
} | |
dependencies { | |
implementation(libs.myLibrary) | |
} |
OlderNewer