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
<?php | |
namespace App\Console\Traits; | |
use Closure; | |
use Illuminate\Database\Eloquent\Collection; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Support\Str; | |
use function Laravel\Prompts\info; |
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 | |
gh pr list --author "app/dependabot" --json number \ | |
| jq '.[].number' -r \ | |
| while IFS=$'\t' read -r id; do gh pr comment $id --body "@dependabot rebase" ; done | |
# this would ask dependabot to merge all PRs | |
# | while IFS=$'\t' read -r id; do gh pr comment $id --body "@dependabot merge" ; done |
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 sh | |
print_help() { | |
printf '%s\n' "This script generates mysql user and default database for this user" | |
printf 'Usage: %s <username> [<password>]\n' "$0" | |
printf '\t%s\n' "<username>: username and database name" | |
printf '\t%s\n' "<password>: password for user (default: generates random password using pwgen)" | |
} | |
die() { |
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 | |
if [ $# -eq 0 ] ; then | |
echo "USAGE: ${0} URL" | |
exit 1 | |
fi | |
URL="$1" | |
if [ "$URL" = "${URL##https:\/\/}" ]; 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
<?php | |
namespace App\Console\Traits; | |
trait ArgumentOrAsk | |
{ | |
public function argumentOrAsk($argumentName, $question = null, $default = null) | |
{ | |
$argument = $this->argument($argumentName); |
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 | |
ACME_PATH="/home/kehet/traefik/acme.json" | |
DOMAIN="secret.example.com" | |
WEECHAT_PATH="/home/kehet/weechat/weechat" | |
cat "${ACME_PATH}" | jq '.myresolver.Certificates[] | select( .domain.main == "${DOMAIN}" ) | .key' --raw-output | base64 -d > "${WEECHAT_PATH}/ssl/relay.pem" | |
cat "${ACME_PATH}" | jq '.myresolver.Certificates[] | select( .domain.main == "${DOMAIN}" ) | .certificate' --raw-output | base64 -d >> "${WEECHAT_PATH}/ssl/relay.pem" | |
echo "*/relay sslcertkey" > "${WEECHAT_PATH}/weechat_fifo" |
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 sh | |
ID=$(task export | jq -r 'sort_by( -.urgency )[] | [ (.id|tostring), .description ] | join(" ")' | | |
rofi -no-auto-select -i -dmenu -p "Task" | | |
cut -f 1) | |
[ -z "$ID" ] && echo "Cancelled." && exit | |
ACTION=$(printf "start\nstop\nedit\ndone" | rofi -no-auto-select -i -dmenu -p "Action") | |
[ -z "$ACTION" ] && echo "Cancelled." && exit |
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
/poll "What's your favorite color?" "Blue" "Red" "Green" "Yellow" |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#define NUMBER '0' | |
#define MAXOP 100 | |
#define MAXVAL 100 | |
#define BUFSIZE 100 | |
int sp = 0; |
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
[706437,140212,275326,2708236,3571295,986174,3994116,279293,3769644,957836,180192,4823783,223212,312424,247820,79392,2303075,946301,2992993,3818702,652357,544858,185015,7208677,94564,126683,8514039,787504,2573453] |
NewerOlder