Skip to content

Instantly share code, notes, and snippets.

Amitai Burstein amitaibu

Block or report user

Report or block amitaibu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View multiple-banks.journal
2019/11/07 set initial assets balance
(assets:banks:BOA) USD50
(assets:banks:CITI) USD500
2019/11/10 Some payment from BOA
expenses:food USD60 ; <- This means "assets:banks:BOA" should be negative
assets:banks:BOA
View example.journal
P 2019-01-01 USD ILS5
2019/01/01 set initial assets balance
(assets:banks:ils) ILS500
(assets:banks:us) USD100
2019/11/07 Salaries Israel
expenses:salary:Israel ILS400
assets:banks:ils
View Main.md
main =
   Browser.element
       { init = App.Update.init
-       , update = App.Update.update
+       , update = Update.Fetch.andThenFetch App.Fetch.fetch App.Update.update
       , view = App.View.view
       , subscriptions = App.Update.subscriptions
       }
View HedleyMigrateUsers.php
<?php
/**
* @file
* Contains \HedleyMigrateUsers.
*/
/**
* Class HedleyMigrateUsers.
*/
View gist:20e8f8d79eca0db06eadb7b87625a3d7
APIVersion: v1.6.0
name: my-drupal8-site
type: php
docroot: ""
php_version: "7.1"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
View gist:b398291373663fbc5402025af5c3ec67
ddev composer create drupal-composer/drupal-project:8.x-dev --stability dev --no-interaction
Warning: Any existing contents of the project root (/Users/itama/Sites/my-drupal8-site) will be removed
Removing any existing files in project root
Executing composer command: composer create-project drupal-composer/drupal-project:8.x-dev /var/www/html/.tmp_ddev_composer_create_VjDray --stability dev --no-interaction
Installing drupal-composer/drupal-project (8.x-dev 4229acea4bb6181f421e8dd0e72a02ccdc98df1d)
- Installing drupal-composer/drupal-project (8.x-dev 4229ace): Cloning 4229acea4b from cache
Created project in /var/www/html/.tmp_ddev_composer_create_VjDray
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
View status.elm
type alias Site =
{ label : String
, machineName : String
, statusCount : EveryDict Status Int
-- For UI puropses
, showStatus : EveryDict Status Bool
}
View gist:989f660eb547f58cb74a574ede93e6d4
function show_query($sale_nid) {
$query = db_select('node', 'n');
$query->fields('n', ['nid', 'uid']);
$field_names = [
'field_sale',
'field_user',
'field_website_bidder_id',
];
View Endpoint.elm
module Backend.Endpoint
exposing
( (</>)
, AccessToken
, BackendUrl
, EndPoint
, Entity
, EntityDictList
, EntityId
, EntityUuid
@amitaibu
amitaibu / Model.elm
Created Dec 23, 2017
Excerpt of Item's status
View Model.elm
{-| These are the the states of an open item. You will notice there is a state
called `GoneTranstion` which exists under the Open. This state is a special case
that really exists only as a transition state. That is, when we want to finish
the sale of an item we cannot decide ourself it it's "sold" or "unsold" - that
is the responsibility of the server. So we will send the server a `gone` request,
which will be later decided if the item is sold or not.
So a `GoneTransition` is a very temporarye state, for until we are clear on the `SoldStatus`.
This also works the other way around. That is, when we are in `ItemClosed` state, the clerk
may still go back to `Going` or `Open` in case there was some mistake or a bid was
placed in the room in the right time.
You can’t perform that action at this time.