Skip to content

Instantly share code, notes, and snippets.


Amitai Burstein amitaibu

View GitHub Profile
View gist:2b8ce08c387e6162c3fd2d2112bb2c91
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
View gist:691e0fb4bc3da9b1379131bb1890cdd6
* Test UGC creation from the My library page.
public function testMyLibraryUgcCreate() {
* Test the "My UGC" listing page.
View gist:10a71a8c9fd054101948c583b4cbd04e
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);
View gist:442c5d6386617084e2a23211e68b2c73
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.
amitaibu / gist:4427e2319ebc3d8aa0bcd9264270e6f3
Last active Mar 10, 2020 — forked from djazayeri/gist:d3dc89988486fe6f988d
Example of using OpenMRS REST to create a patient and an encounter (in OpenMRS 2.1)
View gist:4427e2319ebc3d8aa0bcd9264270e6f3
// go to, log in as admin/Admin123, open the JavaScript console, and do the following:
var URL_BASE = "";
var resources = {};
function andLog(data) { console.log(data); }
function andSaveAs(variable) { return function(data) { resources[variable] = data; console.log(variable + " => " + JSON.stringify(data)); } }
function andSaveFirstResultAs(variable) { return function(data) { data = data.results[0]; resources[variable] = data; console.log(variable + " => " + JSON.stringify(data)); } }
function random() { return Math.floor(Math.random() * 10000); }
function post(resource, data, success) {
$.ajax({ type: "POST", url: URL_BASE + resource, contentType: "application/json", data: JSON.stringify(data), success: success });
View gist:e25766c939443ebf1db83ce0e1be185c
$detected_env = 'dev';
switch ($detected_env) {
case 'dev':
$config['']['status'] = TRUE;
$config['environment_indicator.indicator']['bg_color'] = '#4caf50';
$config['environment_indicator.indicator']['fg_color'] = '#000000';
$config['environment_indicator.indicator']['name'] = 'Dev';
amitaibu / hledger-flow.yml
Created Jan 12, 2020
GitHub Action to validate hledger-flow
View hledger-flow.yml
# .github/workflows/hledger-flow.yml
name: Validate hledger-flow
on: [push]
runs-on: ubuntu-latest
View example.journal
2019/11/19 רופא שיניים
expenses:health $ 100.00
2019/11/20 Dentist
expenses:health $ 100.00