Skip to content

Instantly share code, notes, and snippets.

🐹
🐹

Alon Bukai Alonski

🐹
🐹
Block or report user

Report or block Alonski

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
@Alonski
Alonski / controllers.application.js
Last active Jul 27, 2019 — forked from sukima/controllers.application.js
ember-data 3.7 relationships
View controllers.application.js
import Controller from '@ember/controller';
import { reads } from '@ember/object/computed';
export default Controller.extend({
children: reads('model'),
actions: {
clickChild(child) {
console.log(child.parent);
}
}
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
onInput() {
const upper = this.value.toUpperCase();
this.set("value", upper);
}
}
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View controllers.application.js
import Ember from 'ember';
import { computed } from '@ember/object';
import { later } from '@ember/runloop';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init() {
this._super(...arguments);
this.set("sites", [1,2,3]);
later(() => this.set("sites", [1,2,3,4]), 3000)
@Alonski
Alonski / AppHighRoller.sol
Created Jan 25, 2019
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.1+commit.c8a2cb62.js&optimize=false&gist=
View AppHighRoller.sol
pragma solidity 0.5;
pragma experimental "ABIEncoderV2";
import "./Transfer.sol";
/// @title High Roller App
/// @notice This contract allows the playing of a dice rolling game.
/// Two players take turns rolling two dice each.
/// The winner is the player whose sum of dice outcomes is highest.
@Alonski
Alonski / HashSplitTest.sol
Created Dec 5, 2018
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=false&gist=
View HashSplitTest.sol
pragma solidity 0.4.25;
pragma experimental "ABIEncoderV2";
contract HashTestSplit {
function calculateFinalHash(uint256 num1, uint256 num2)
public
pure
returns (bytes32)
{
@Alonski
Alonski / components.my-angel.js
Created Jul 9, 2018
Angel Angle Brackets Bug
View components.my-angel.js
import Ember from 'ember';
export default Ember.Component.extend({
});
View components.my-angel.js
import Ember from 'ember';
export default Ember.Component.extend({
});
View controllers.application.js
import Ember from 'ember';
const { get, set } = Ember;
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init() {
this._super(...arguments);
set(this, "statusList", [
Ember.Object.create({
id: 1,
period: "",
You can’t perform that action at this time.