by @delasy
This script is way more advanced than other scripts out there.
- allows generating HamsterKombat coupon code for free using your machine.
| <?php | |
| /** | |
| * Guzzle Middleware: JSON Fixture Dumper | |
| * | |
| * Intercepts HTTP responses and dumps JSON to temp files for later analysis. | |
| * Use this to capture API responses for the DTO generator. | |
| * | |
| * Usage: | |
| * 1. Get the Guzzle handler stack from your HTTP client |
by @delasy
This script is way more advanced than other scripts out there.
| name: Tests (PHP) | |
| on: [push] | |
| jobs: | |
| tests: | |
| name: Run tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 |
| // FILE PATH: /resources/js/app.js | |
| require('./bootstrap'); | |
| // Import Service Worker Registry | |
| require('./extensions/sw-registry'); | |
| import Vue from 'vue'; | |
| ... |
| # Change to the project directory | |
| cd $FORGE_SITE_PATH | |
| # Turn on maintenance mode | |
| php artisan down || true | |
| # Pull the latest changes from the git repository | |
| # git reset --hard | |
| # git clean -df | |
| git pull origin $FORGE_SITE_BRANCH |
| import subprocess | |
| import os | |
| import re | |
| import sys | |
| import argparse | |
| import httplib, urllib | |
| import time | |
| """ | |
| # place this file at /home/ethos/check_hash_reboot.py |
Handy helpers for controlling visibility of elements until Vue has compiled.
Use like:
<div v-cloak>
<h1>
<span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
<span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
| { | |
| "AF": { | |
| "name": "Afghanistan", | |
| "iso2": "AF", | |
| "iso3": "AFG", | |
| "nationality": "Afghan", | |
| "code": "004", | |
| "prefix": "93" | |
| }, | |
| "AL": { |
| <?php | |
| $attributeValues = array( | |
| 'color' => array('Red', 'White', 'Blue'), | |
| 'size' => array(1, 2, 3, 4), | |
| 'fabric' => array('Cloth', 'Silk') | |
| ); | |
| class Cartesian | |
| { |
We will assume we have a package/project called https://github.com/foo/bar
Most redistributable packages are hosted on a version control website such as Github or Bitbucket. Version control repositories often have a tagging system where we can define stable versions of our application. For example with git we can use the command:
git tag -a 1.0.0 -m 'First version.'
With this we have created version 1.0.0 of our application. This is a stable release which people can depend on. If we wanted to include "foo/bar" then we could create a composer.json and specify the tagged release we wanted: