Skip to content

Instantly share code, notes, and snippets.

View AmilKey's full-sized avatar
🏠
Working from home

Ivan AmilKey

🏠
Working from home
View GitHub Profile
@AmilKey
AmilKey / controllers.application.js
Last active March 2, 2018 18:35
test push nodes
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init() {
this._super(...arguments);
let data = [];
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@AmilKey
AmilKey / gist:9d040dfb0400bc942a428cd32184b9b0
Created February 24, 2017 09:09
to discard local commits
Your branch is ahead of 'origin/master' by 3 commits.
will remove all commits not in origin/master where origin is the repo name and master is the name of the branch.
git reset --hard origin/master
var Calculator = {
init: function() {
this.output = document.getElementById('output');
this.resultText = '';
this.resultNumber = 0;
},
onClick: function(e) {
console.log(e.target.innerHTML);
const buttonText = e.target.innerHTML;
@AmilKey
AmilKey / gist:ed84b961db13b1322c5e238e8d2b2666
Created December 12, 2016 11:58
Prevent scroll-bar from adding-up to the Width of page on Chrome
http://stackoverflow.com/questions/18548465/prevent-scroll-bar-from-adding-up-to-the-width-of-page-on-chrome
html {
overflow-x: hidden;
margin-right: calc(-1 * (100vw - 100%));
}
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
#outlook a { padding: 0; }
.ReadMsgBody { width: 100%; }
.ExternalClass { width: 100%; }
.ExternalClass * { line-height:100%; }
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
#outlook a { padding: 0; }
.ReadMsgBody { width: 100%; }
.ExternalClass { width: 100%; }
.ExternalClass * { line-height:100%; }
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"file_exclude_patterns":
[
".DS_Store",
"._*"
],
"folder_exclude_patterns":
[
".svn",
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@AmilKey
AmilKey / save
Created September 14, 2016 11:30
save relanships
https://guides.emberjs.com/v2.7.0/models/relationships/
```
let blogPost = this.get('store').peekRecord('blog-post', 1);
let comment = this.get('store').createRecord('comment', {
});
blogPost.get('comments').pushObject(comment);
comment.save().then(function () {