Skip to content

Instantly share code, notes, and snippets.

View amitaibu's full-sized avatar

Amitai Burstein amitaibu

View GitHub Profile
# https://ddev.readthedocs.io/en/stable/users/cli-usage/#drupal-8-quickstart
mkdir my-drupal8-site
cd my-drupal8-site
ddev config --project-type=drupal8 --docroot=web --create-docroot
ddev start
ddev composer create "drupal/recommended-project:^8"
ddev composer require drush/drush
ddev launch
@amitaibu
amitaibu / Elm.md
Last active August 10, 2020 10:20
/**
* Test UGC creation from the My library page.
*/
public function testMyLibraryUgcCreate() {
}
/**
* Test the "My UGC" listing page.
*/
DROP TABLE IF EXISTS employees;
CREATE TABLE employees( id integer, name text,
designation text, manager integer,
hired_on date, salary integer,
commission float, dept integer);
INSERT INTO employees VALUES (1,'JOHNSON','ADMIN',6,'1990-12-17',18000,NULL,4);
INSERT INTO employees VALUES (2,'HARDING','MANAGER',9,'1998-02-02',52000,300,3);
INSERT INTO employees VALUES (3,'TAFT','SALES I',2,'1996-01-02',25000,500,3);
INSERT INTO employees VALUES (4,'HOOVER','SALES I',2,'1990-04-02',27000,NULL,3);
hledger to Excel/ SASS solutions is like:
 -Git to SVN
- Proper IDE/ VIM/ Emacs to Notepad
- Automated script to manual work
With plain text accounting you can start thinking about your financial data in ways you haven't been able so far:
- Version controlled, with all the Git goodies and workflows that come with it.
- Piece of mind, that your data will always remain, history is always there, and it's readable forever.
$detected_env = 'dev';
switch ($detected_env) {
case 'dev':
$config['config_split.config_split.dev']['status'] = TRUE;
$config['environment_indicator.indicator']['bg_color'] = '#4caf50';
$config['environment_indicator.indicator']['fg_color'] = '#000000';
$config['environment_indicator.indicator']['name'] = 'Dev';
break;
@amitaibu
amitaibu / hledger-flow.yml
Created January 12, 2020 12:54
GitHub Action to validate hledger-flow
# .github/workflows/hledger-flow.yml
name: Validate hledger-flow
on: [push]
jobs:
build:
runs-on: ubuntu-latest
2019/11/19 רופא שיניים
expenses:health $ 100.00
assets:bank
2019/11/20 Dentist
expenses:health $ 100.00
assets:bank
hledger print -f in-out.csv
2019/12/01
hledger: both amount-in and amount-out have a value
amount-in: 0
amount-out: 10
record: the CSV record is: "01/12/19","foo","0","10"