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
| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # requires-python = ">=3.13" | |
| # dependencies = ["PyGithub", "requests", "xdg", "tomlkit"] | |
| # /// | |
| # | |
| # example config: ~/.config/install-from-github/packages.toml | |
| # ```toml | |
| # github_api_token="github_<GET_YOUR_OWNY>" | |
| # |
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
| proxy_cache_path /var/cache/nginx/npm_cache levels=1:2 keys_zone=npm_cache:10m; | |
| upstream npm_registry { | |
| server registry.npmjs.org:443; | |
| } | |
| server { | |
| listen 80; | |
| server_name blblabla; |
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
| function define (req, factory) { | |
| if (typeof req === 'function') { | |
| factory = req | |
| req = [] | |
| } | |
| return sap.ui.define(req, factory, true) | |
| } | |
| define.amd = true |
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
| define(['./Object'], function (BaseObject) { | |
| "use strict"; | |
| /** | |
| * @class some cool class | |
| * | |
| * @abstract | |
| * @public | |
| * @alias demo.AbstractClass | |
| */ |
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
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| function setup_pgpass_file { | |
| echo -n "" > ~/.pgpass | |
| chmod 600 ~/.pgpass | |
| } | |
| function backup_database { |
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
| #!/usr/bin/env bash | |
| set -e | |
| function install_dynamodb_local { | |
| if [ ! -e "db/DynamoDBLocal.jar" ]; then | |
| echo "Downloading DynamoDBLocal" | |
| mkdir -p db && cd db | |
| curl "https://s3.eu-central-1.amazonaws.com/dynamodb-local-frankfurt/dynamodb_local_latest.tar.gz" -s | tar -xz | |
| cd .. |
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
| error[E0277]: the trait bound `errors::Error: storage::_IMPL_DESERIALIZE_FOR_User::_serde::export::From<std::sync::PoisonError<std::sync::MutexGuard<'_, rocksdb::DB>>>` is not satisfied | |
| --> src/storage.rs:28:15 | |
| | | |
| 28 | match self.db.lock()?.get(format!("user:{}", username).as_bytes()) { | |
| | ^^^^^^^^^^^^^^^ the trait `storage::_IMPL_DESERIALIZE_FOR_User::_serde::export::From<std::sync::PoisonError<std::sync::MutexGuard<'_, rocksdb::DB>>>` is not implemented for `errors::Error` | |
| | | |
| = help: the following implementations were found: | |
| <errors::Error as storage::_IMPL_DESERIALIZE_FOR_User::_serde::export::From<std::num::ParseIntError>> | |
| <errors::Error as storage::_IMPL_DESERIALIZE_FOR_User::_serde::export::From<std::io::Error>> | |
| <errors::Error as storage::_IMPL_DESERIALIZE_FOR_User::_serde::export::From<chrono::ParseError>> |
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
| #!/bin/bash | |
| declare -A deployTo | |
| deployTo[development]="/home/masch/gitdeploy/dev" | |
| deployTo[master]="/home/masch/gitdeploy/prod" | |
| gitDir="/home/masch/gitdeploy/deploy.git" | |
| function deploy() { | |
| branch=$1 |
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
| function createElement(definition) { | |
| var attributes = definition.attributes | |
| if (typeof definition.elementName !== 'string') { | |
| var Class = definition.elementName | |
| if (Class.getMetadata) { | |
| var oMetadata = Class.getMetadata() | |
| var sDefaultAggregation = oMetadata._sDefaultAggregation | |
| if (typeof sDefaultAggregation === 'string') { |
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
| function Item(props) { | |
| return <li>{props.message}</li>; | |
| } | |
| function TodoList() { | |
| const todos = ['finish doc', 'submit pr', 'nag dan to review']; | |
| return ( | |
| <ul> | |
| {todos.map((message) => <Item key={message} message={message} />)} | |
| </ul> |
NewerOlder