Skip to content

Instantly share code, notes, and snippets.

View schmunk42's full-sized avatar

Tobias Munk schmunk42

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Button Callbacks</title>
<script src="../../dist/jsoneditor.js"></script>
</head>
<body>
<textarea class="value" cols="30" rows="10"></textarea>
@schmunk42
schmunk42 / schema.json
Created August 31, 2023 06:55
json-editor issue 1383
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"activity-timeout": {
"description": "How long a CMFActivity-initiated transaction may last, in seconds",
"default": null,
"type": [
"number",
"null"
@schmunk42
schmunk42 / autogenerate-packages.php
Created October 8, 2012 16:27
Test-script to auto-generate packages.json from github API
<?php
// get all repos from yiiext
$response = file_get_contents("https://api.github.com/orgs/yiiext/repos");
$repos = json_decode($response);
#var_dump($repos);
// get versions/tags
$satis = array();
foreach($repos AS $num => $repo) {
@schmunk42
schmunk42 / git-changelog-markdown.sh
Last active June 5, 2019 13:32
Bash git changelog draft function
# Usage: git-changelog-markdown > changelog-draft.md
git-changelog-markdown () {
git log --topo-order --pretty="format:%d - %s" | sed 's/(tag.*) /\
### & \
/' \
| grep -v 'Merge pull request' \
| grep -v 'Merge commit'
}
@schmunk42
schmunk42 / package-lock.json
Created November 30, 2018 14:38
package.json examples generated with foxy
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"@composer-asset/yiisoft--yii-bootstrap4": {
"version": "file:vendor/foxy/composer-asset/yiisoft/yii-bootstrap4",
"requires": {
"bootstrap": "^4.1.3",
"jquery": "^3.3.1",
"popper.js": "^1.14.5"
@schmunk42
schmunk42 / composer.json
Last active November 16, 2017 13:39
High memory usage (asset-packagist vs fxpio/cap)
{
"name": "dmstr/phd5-app",
"minimum-stability": "beta",
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],
"require": {
> FXP_ASSET__ENABLED=0 composer create-project -vvv yiisoft/yii2-app-advanced advanced-noplugin 2.0.12
Loading config file /Users/tobias/.composer/config.json
Loading config file /Users/tobias/.composer/auth.json
Reading /Users/tobias/.composer/composer.json
Loading config file /Users/tobias/.composer/config.json
Loading config file /Users/tobias/.composer/auth.json
Loading config file /Users/tobias/.composer/composer.json
Loading config file /Users/tobias/.composer/auth.json
Reading /Users/tobias/.composer/auth.json
Checked CA file /opt/local/share/curl/curl-ca-bundle.crt: valid
@schmunk42
schmunk42 / install.log
Created October 5, 2017 09:49
composer create-project -vvv yiisoft/yii2-app-advanced advanced2 2.0.12
> composer create-project -vvv yiisoft/yii2-app-advanced advanced2 2.0.12
Loading config file /Users/tobias/.composer/config.json
Loading config file /Users/tobias/.composer/auth.json
Reading /Users/tobias/.composer/composer.json
Loading config file /Users/tobias/.composer/config.json
Loading config file /Users/tobias/.composer/auth.json
Loading config file /Users/tobias/.composer/composer.json
Loading config file /Users/tobias/.composer/auth.json
Reading /Users/tobias/.composer/auth.json
Checked CA file /opt/local/share/curl/curl-ca-bundle.crt: valid
@schmunk42
schmunk42 / AcceptanceHelper.php
Created August 24, 2017 10:40 — forked from pastuhov/AcceptanceHelper.php
codeception page load wait helper
<?php
namespace tests\codeception\common\_support;
use Codeception\Exception\ModuleException;
/**
*
*/
class AcceptanceHelper extends \Codeception\Module
@schmunk42
schmunk42 / docker-compose-up.log
Created January 13, 2017 18:39
docker-compose up -d - swarm pulls on all nodes
sam /roj/stacks/test/swarm-pull-test> docker-compose --verbose up
compose.config.config.find: Using configuration files: ./docker-compose.yml
docker.auth.auth.find_config_file: Trying paths: ['/roj/config/config.json', '/root/.docker/config.json', '/root/.dockercfg']
docker.auth.auth.find_config_file: Found file at path: /roj/config/config.json
docker.auth.auth.load_config: Found 'auths' section
docker.auth.auth.parse_auth: Found entry (registry=u'registry.example.com/hrzg/ee', username=u'registry')
compose.cli.command.get_client: docker-compose version 1.8.1, build 878cff1
docker-py version: 1.10.3
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013