Skip to content

Instantly share code, notes, and snippets.

View Alonski's full-sized avatar
🐹
🐹

Alon Bukai Alonski

🐹
🐹
View GitHub Profile
@Alonski
Alonski / ember-cli-build.js
Last active April 4, 2023 16:01
Setting up Ember CLI + SCSS + PostCSS + TailwindCSS + CSSNano
const postcssOptions = {
compile: {
enabled: false // Set compile to false to not run PostCSS *during* compliation
},
filter: {
enabled: true, // Set filter to true to run PostCSS *after* compilation
...require("./postcss.config")
}
};
@Alonski
Alonski / application.hbs
Created February 19, 2020 20:52
Ember.JS Ember Animated Route Transition Animations
<AnimatedOrphans />{{outlet}}
@Alonski
Alonski / controllers.application.js
Last active July 27, 2019 18:48 — forked from sukima/controllers.application.js
ember-data 3.7 relationships
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);
}
}
@Alonski
Alonski / controllers.application.js
Created February 20, 2019 13:45
PowerSelectWithCreate
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@Alonski
Alonski / controllers.application.js
Last active February 17, 2019 15:26
SetValueMovesCursor
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
onInput() {
const upper = this.value.toUpperCase();
this.set("value", upper);
}
}
@Alonski
Alonski / controllers.application.js
Created February 17, 2019 10:15
PartialsBroken3.4
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@Alonski
Alonski / controllers.application.js
Created February 4, 2019 08:11
Showcase Computed
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 January 25, 2019 12:55
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=
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 December 5, 2018 16:11
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=
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 July 9, 2018 15:02
Angel Angle Brackets Bug
import Ember from 'ember';
export default Ember.Component.extend({
});