Skip to content

Instantly share code, notes, and snippets.

@Robert-96
Robert-96 / README.md
Last active March 27, 2025 03:22
Ember.Js: Installing Tailwind CSS

Ember.Js: Installing Tailwind CSS

TL;DR

$ ember install ember-cli-postcss                   # Install ember-cli-postcss
$ npm install --save-dev tailwindcss                # Install tailwindcss

$ npx tailwind init app/styles/tailwind.config.js   # Optional: Generate a Tailwind config file for your project  
$ npm install -save-dev postcss-import # Optional: If you want to use the @import statement
@devtoro
devtoro / adapters.application.js
Last active July 31, 2017 22:35 — forked from bmac/adapters.application.js
ember data issue 4906
import Adapter from "ember-data/adapters/rest";
export default Adapter.extend();
@mike-north
mike-north / routes.application.js
Last active March 10, 2020 17:09
async/await in Ember Routes
import Ember from 'ember';
const DATA_URL = 'https://api.github.com/orgs/emberjs/repo';
export default Ember.Route.extend({
// Values returned from async function are Promises
model: async function() {
// Get the data, AND WAIT FOR IT TO RETURN (type: Object)
var data = await $.getJSON(DATA_URL);
@jmacqueen
jmacqueen / application.js
Created October 6, 2016 16:06
Create an Ember application instance that can be imported into any file. Useful for container lookups in files outside of the usual hierarchy.
// app/instance-initializers/application.js
import appInst from 'appName/utils/application'
export function initialize( appInstance ) {
appInst.instance = appInstance
}
export default {
name: 'application',
initialize
};
@Bekbolatov
Bekbolatov / tmux.md
Last active February 18, 2025 16:47
Clean tmux cheat-sheet

Clean tmux cheat-sheet

By resources

sessions

list-sessions        ls         -- List sessions managed by server
new-session          new        -- Create a new session
@code0100fun
code0100fun / app_controllers_sign-in.js
Created June 8, 2015 20:02
Ember Simple AUth + Ember CLI Mirage
// app/controllers/sign-in.js
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
signIn(){
this.set('errors', null);
var params = { identification: this.get('email'), password: this.get('password') };
// Redirects to index route on success (configurable in config/environment.js)
this.get('session').authenticate('simple-auth-authenticator:oauth2-password-grant', params);
@HyShai
HyShai / newline-br.js
Last active March 2, 2017 17:35
convert new lines to <br/> tags for rendering
//helpers/newline-br.js
import Ember from 'ember';
export function newlineBr(text) {
var breakTag = '<br />';
return new Ember.Handlebars.SafeString((text + '')
.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2'));
}
export default Ember.Handlebars.helper('newLineBr',newlineBr);
.form-group
label
| Time Zone
time-zone value=model.timezone
@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 5, 2025 09:32
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@barryvdh
barryvdh / _ide_helper.php
Last active December 16, 2024 10:25
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <[email protected]>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");