Skip to content

Instantly share code, notes, and snippets.

@sajt
sajt / drupal_7_install.sh
Last active December 24, 2015 06:59
My drupal install. This will be a drupal profile later.
git clone --branch 7.x http://git.drupal.org/project/drupal.git
cd drupal
drush si --db-url=mysql://root:password@localhost/drupal_dev --locale=hu
cd sites/all/modules/
mkdir custom contrib features ../libraries
drush dl -y views admin_menu features pathauto token panels panels_everywhere ctools l10n_update media markdown markdowneditor strongarm devel views_bulk_operations jquery_update ds rules module_filter
drush en -y views_ui admin_menu admin_menu_toolbar features pathauto token panels panels_everywhere ctools l10n_update media markdown markdowneditor strongarm devel views_bulk_operations jquery_update panels_mini panels_node module_filter rules_admin
drush dis -y overlay toolbar
@sajt
sajt / gist:3c12360fa8c5d0f776ca
Last active August 29, 2015 14:10
fig + docker tips
//All fig in the directory, where the fig.yml
sudo fig ps
sudo fig logs
sudo docker exec -i -t b239cc6a269d bash //login to the container get from the fig ps
/*
This is my composer.json file for http://reload.github.io/phing-drupal-template/
after the save to the drupal root directory
composer install
using phing:
./vendor/phing/phing/bin/phing
see the url above for more commands
*/
{
"require-dev": {
@sajt
sajt / gist:90fb5e050b1ef79579cd
Created January 10, 2015 06:35
OSX docker drupal.hu-hoz
#docker ip
boot2docker ip drupalhu_web_1
#file berakás a dockerba (pld az sql): egyszerűen másold be a drupal.hu/dockerfiles/druphungary könyvtárba
#Így el lehet érni /var/www/site-php könyvtárban a docker image-ben
#loginolás a dockerbe
docker exec -i -t drupalhu_web_1 bash
import Ember from 'ember';
export default Ember.Controller.extend({
model: [
{id: 1,
name: 'First',
extra: 'First extra'
},
{
id: 2,
import Ember from 'ember';
export default Ember.Controller.extend({
show: null,
menus: Ember.computed('model', function() {
return this.model;
}),
actions: {
showMatch(menu) {
//alert('Start');
@sajt
sajt / My ember.md
Last active August 29, 2015 14:28
My ember things

My Ember.js things

I love Ember because it means human in my mothertongue

Install Ember.js 2.0

ember new project-name
cd project-name
bower install ember --save-dev //choose the latest one. Now 2.0.1
@sajt
sajt / gist:b7d7a1fffb05cbd222f9
Created March 15, 2016 11:28
Generate project with firebase
ember new projectname
cd projectname
ember install ember-cli-sass ember-sass-bootstrap ember-suave emberfire torii ember-cp-validations
setting firebase: https://www.firebase.com/docs/web/libraries/ember/guide.html
The app/routes/application.js beforeModel is very important!!!
ember generate route application
@sajt
sajt / cake.hbs
Last active April 12, 2016 13:38
BelongsTo example and question
<select onchange={{action (mut cake.factoryId) value="target.value"}} class="form-control">
<option>-- Choose one --</option>
{{#each factories as |factory|}}
<option value={{factory.id}} selected={{eq factory.id cake.factoryId}}>{{factory.name}}</option>
{{/each}}
</select>
<button type="submit" class="btn btn-default" {{action 'saveCake' cake}}">Save</button>
core: 7.x
api: 2
projects:
drupal:
version: '7.50'
admin_menu:
subdir: contrib
version: 3.0-rc5
ctools:
subdir: contrib