for d in */; do
dir=${d%/}
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
44 / 60 * 45 = 32.999 | |
44 / 4 * 3 = 33 |
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 | |
$iShowPostAmount = isset($_GET['show']) ? (int)$_GET['show'] : 5; | |
$$iItemLimit = isset($_GET['page']) ? (int)$_GET['page'] : 1; | |
$iTotalItems = (int) getRepliesCount() + 1; | |
$iAdjacents = 1; | |
$iNextPage = $iCurrentPage + 1; | |
$iPreviousPage = $iCurrentPage - 1; | |
$iPagesCount = ceil($iTotalItems / $iItemLimit); |
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
public class LanguagesString { | |
private String en; | |
private String de; | |
public String getEn() { | |
return en; | |
} | |
public LanguagesString setEn(String en) { | |
this.en = en; |
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 java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.Scanner; | |
public class Shop { | |
public static void main(String[] args) { | |
// Create the products list | |
ArrayList<Product> productList = new ArrayList<>(); | |
// Create and add product 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
#!/bin/bash | |
# Verify versions | |
echo "[ ] Check if Java is available..." | |
if java -version 2>&1 >/dev/null | grep -q "openjdk version" ; then | |
echo -e "\e[1A[ \e[32mOK\e[39m ]" | |
elif java -version 2>&1 >/dev/null | grep -q "java version"; then | |
echo -e "\e[1A[ \e[32mOK\e[39m ]" | |
else | |
echo -e "\e[1A[\e[31mFAIL\e[39m]" >&2 |
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 | |
# The zone ID of the domain | |
CF_ZONE_ID= | |
# The email of the user and the global api key | |
CF_USER_EMAIL= | |
CF_GLOBAL_API_KEY= | |
# A generated API key with the permission "Zone.DNS" |
https://github.com/dszczer/ideolog-symfony-format
- PHPStorm
- Installed and running Ideolog plugin
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 | |
# SymfonyCloud CLI installer. | |
set -euo pipefail | |
CLI_LATEST_VERSION_URL="https://get.symfony.com/cli/LATEST" | |
CLI_CONFIG_DIR=".symfony" | |
CLI_EXECUTABLE="symfony" | |
CLI_TMP_NAME="$CLI_EXECUTABLE-"`date +"%s"` | |
CLI_NAME="Symfony CLI" |
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 | |
REPO= | |
TOKEN= | |
# https://starkandwayne.com/blog/bash-for-loop-over-json-array-using-jq/ | |
for deployment in $(curl https://api.github.com/repos/$REPO/deployments | jq -r '.[] | @base64'); do | |
DEPLOYMENT_ID=$(echo "$deployment" | base64 --decode | jq -r '.id') | |
echo "$DEPLOYMENT_ID" | |
curl "https://api.github.com/repos/$REPO/deployments/$DEPLOYMENT_ID/statuses" \ |
OlderNewer