This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import DS from 'ember-data'; | |
export default DS.JSONAPIAdapter.extend({ | |
findRecord() { | |
return { | |
data: { | |
id: '1', | |
type: 'books', | |
attributes: { | |
config: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import { A } from '@ember/array'; | |
import ArrayProxy from '@ember/array/proxy'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
init(...args) { | |
this._super(...args); | |
let a = ArrayProxy.create({ | |
content: A(["hello", "world"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'get lucky' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#In some steps you should open a new tab and continue there | |
# Ubuntu packages | |
sudo apt-get update | |
sudo apt-get install -y autoconf automake python-dev make git curl samba-libs | |
# Node and npm | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash | |
nvm install 6.10.2 | |
nvm use 6.10.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Returns a string with full name of component, like: <ProjectName@component:path/to/component-name::ember793> | |
let componentName = this.toString (); | |
//This regex will match the component and capture the latest part of component path. | |
let regex = componentName.match (/<[a-zA-Z]+@[a-zA-Z]+:(?:[a-z]+[\/])*([-a-z]+)::[a-zA-Z]+[0-9]+>/); | |
//The latest element of array is the component name. | |
console.log (regex[regex.length-1]); //component-name | |
//See: https://regex101.com/r/rX9bQ7/3 for explanation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* © 2016 - Julián Acosta | |
* License: CC BY-SA 4.0 (http://creativecommons.org/licenses/by-sa/4.0/) | |
* | |
* Print your own logo in developer tools! | |
* | |
* Step 1: Convert your logo to ASCII text here: http://picascii.com (I used color output) | |
* Note: Is possible that you'll have to resize your photo in order to retain aspect ratio | |
* Step 2: Remove the <pre></pre> tag that is surrounding the generated code, replace with "[" and "]" | |
* Step 3: Run the following regexes (*DON'T ALTER THE ORDER*) in order to convert to JSON (Works in PHPStorm and Sublime Text 2): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT CONCAT( "ALTER TABLE `", TABLE_NAME, "` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" ) AS ExecuteTheString | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE TABLE_SCHEMA = "name_of_table" | |
AND TABLE_TYPE = "BASE TABLE" | |
LIMIT 0 , 30 |