Skip to content

Instantly share code, notes, and snippets.

View timani's full-sized avatar

Timani Tunduwani timani

View GitHub Profile
@timani
timani / gist:5667861
Created May 29, 2013 03:54
If you want to render two different templates into outlets of two different rendered templates of a route: - http://emberjs.com/guides/routing/rendering-a-template/ Ember.js
App.PostRoute = App.Route.extend({
renderTemplate: function() {
this.render('favoritePost', { // the template to render
into: 'posts', // the template to render into
outlet: 'posts', // the name of the outlet in that template
controller: 'blogPost' // the controller to use for the template
});
this.render('comments', {
into: 'favoritePost',
outlet: 'comment',
@timani
timani / First time sync of a git fork
Created June 20, 2013 17:13
Syncing a fork of wordpress with the main Github clone. The remote add can be skipped if the upstream has already been added.
git remote add wordpress https://github.com/WordPress/WordPress.git
git fetch wordpress
git merge wordpress/master
git push origin master
@timani
timani / Newline at EOF in sublime text 2
Created July 25, 2013 04:57
Adding the Newline at EOF support in sublime text 2. Should appease github
http://stackoverflow.com/questions/5813311/no-newline-at-end-of-file
https://github.com/editorconfig/editorconfig/wiki/Newline-at-End-of-File-Support
// Set to true to ensure the last line of the file ends in a newline
// character when saving
"ensure_newline_at_eof_on_save": true,
#!/bin/sh
# Sublime Text 3 install with Package Control
# http://simonewebdesign.it/blog/install-sublime-text-3-on-fedora-20/
# Run this script with:
# $ curl LINK_TO_THIS_SCRIPT | sh
curl -o ~/st3.tar.bz2 http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3059_x64.tar.bz2
@timani
timani / gist:92a480ad6f7cbe66534e
Created May 10, 2014 18:39
Auto-identify for your registered nickname on freenode using weechat - http://fixato.org/guides/setting_up_weechat.html
// Now you can also set your registered nickname and password for freenode:
$ /set irc.server.freenode.sasl_username # "ReplaceThisWithYourRegisteredNickname"
$ /set irc.server.freenode.sasl_password # "ReplaceThisWithYourNickname'sPassword"
Now you should be all set to /connect freenode or /reconnect freenode.
$ /connect freenode
http://fixato.org/guides/setting_up_weechat.html
$ sudo docker search drupal
2014/05/11 13:20:03 Get http:///var/run/docker.sock/v1.11/images/search?term=drupal: dial unix /var/run/docker.sock: no such file or directory
@timani
timani / Check for containers
Last active August 29, 2015 14:01
Creating a Drupal container with docker
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
$ git clone git://github.com/imathis/octopress.git portal
Cloning into 'portal'...
remote: Reusing existing pack: 10374, done.
remote: Counting objects: 23, done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 10397 (delta 7), reused 3 (delta 1)
Receiving objects: 100% (10397/10397), 2.75 MiB | 727.00 KiB/s, done.
Resolving deltas: 100% (4975/4975), done.
Checking connectivity... done.
$ cd portal/
2014/05/15 08:57:21 [error] 31914#0: *13543 connect() to unix:/srv/bindings/0181b7c2caqe34534qw34533453e69cd027b13556df00/run/php-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /index.php?q=user HTTP/1.0", upstream: "fastcgi://unix:/srv/bindings/0181b7c2caqe34534qw34533453e69cd027b13556df00/run/php-fpm.sock:", host: "dev-example.gotpantheon.com"
2014/05/15 08:57:21 [alert] 31914#0: *13546 128 worker_connections are not enough while connecting to upstream, client: unix:ded-fo, server: , request: "GET /index.php?q=user HTTP/1.0", upstream: "http://127.0.0.1:452/index.php?q=user", host: "dev-example.gotpantheon.com"
@timani
timani / gist:8150408e41b074fac559
Created June 1, 2014 23:40
Laravel and PHP 5 web server
674 php -S localhost:8000
675 ll
676 cd app/
677 ll
678 cd ..
679 cd public/
680 ll
681 php -S localhost:8000
682 php -l
683 php -i